Skip to content

Commit

Permalink
Merge branch 'master' of github.com:Kruhlmann/classicdb_bot
Browse files Browse the repository at this point in the history
  • Loading branch information
Kruhlmann committed Oct 31, 2023
2 parents a1eb4ba + 4329927 commit c64955e
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ RUN apt update \
&& apt-get install -y --no-install-recommends make git \
&& npm install --global pnpm
WORKDIR /usr/app
COPY data.json .
COPY Makefile .
COPY package.json .
COPY pnpm-lock.yaml .
Expand Down
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# Classic DB discord bot

[![Discord Server](https://img.shields.io/discord/572880907682447380%20.svg?logo=discord&style=for-the-badge)](https://discord.gg/Y5eA3dW)
[![Build Status](https://img.shields.io/travis/Kruhlmann/classicdb_bot.svg?style=for-the-badge)](https://travis-ci.org/Kruhlmann/classicdb_bot)
[![Maintainability](https://img.shields.io/codeclimate/maintainability/Kruhlmann/classicdb_bot.svg?style=for-the-badge)](https://codeclimate.com/github/Kruhlmann/classicdb_bot/maintainability)
[![CII Best Practices](https://img.shields.io/cii/percentage/2579.svg?label=CII%20Best%20Practices&style=for-the-badge)](https://bestpractices.coreinfrastructure.org/projects/2579)

## Setup
Expand Down
6 changes: 6 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: '3'
services:
classicdb_bot:
image: classicdb_bot
env_file:
- .env
3 changes: 2 additions & 1 deletion src/item/storage.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import { readFileSync } from "fs";
import { Item } from "./item";
import * as path from "node:path"

let items: Item[] = [];
let autocomplete: Record<string, { name: string; value: string }>;

export function get_items(): Item[] {
if (items.length === 0) {
items = JSON.parse(
readFileSync("/home/ges/doc/src/github.com/kruhlmann/neo_classicdb_bot/data.json").toString(),
readFileSync(path.join(__dirname, '../../data.json')).toString(),
);
}
return items;
Expand Down

0 comments on commit c64955e

Please sign in to comment.