Songbird
Songbird
SIASapphire - Imagine a framework
Created by Songbird on 5/10/2024 in #sapphire-support
BulkOverwrite has stopped functioning
No description
65 replies
SIASapphire - Imagine a framework
Created by Songbird on 1/9/2024 in #sapphire-support
Proper way to setup ESLint
what's the proper way to setup ESLint? I'm attempting to look at the github repo for gemboard and I am unable to figure it out by looking at the configs.
24 replies
SIASapphire - Imagine a framework
Created by Songbird on 1/8/2024 in #sapphire-support
How to push incomplete .env file to repo?
https://github.com/sapphiredev/gemboard/blob/main/src/.env -> Wondering how this environment file is easily pushed with the token removed (i assume) automatically. Is there a hook/gitignore to setup to automatically remove specific tokens from the environment file or is there a separate .env.local file that is excluded from the repo?
5 replies
SIASapphire - Imagine a framework
Created by Songbird on 1/1/2024 in #sapphire-support
Docker volume issue
Hi, trying to run my bot inside of a docker container on my server (exposing the workdir to the host for changes). Yes, these files are stolen from the official repos. Current bind shows no files on the host and the attached error when trying to run the container. If I run the container without any mount points then it runs fine.
# ================ #
# Base Stage #
# ================ #

FROM node:20-bullseye-slim as base

WORKDIR /usr/src/app

# ENV YARN_DISABLE_GIT_HOOKS=1
ENV CI=true
ENV LOG_LEVEL=info
ENV FORCE_COLOR=true

RUN apt-get update && \
apt-get upgrade -y --no-install-recommends && \
apt-get install -y --no-install-recommends build-essential python3 dumb-init && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* && \
apt-get autoremove

COPY --chown=node:node yarn.lock .
COPY --chown=node:node package.json .
COPY --chown=node:node .yarnrc.yml .
COPY --chown=node:node .yarn/ .yarn/

ENTRYPOINT ["dumb-init", "--"]

# ================ #
# Builder Stage #
# ================ #

FROM base as builder

# ENV NODE_ENV="development"

# COPY --chown=node:node tsconfig.base.json .
COPY --chown=node:node tsconfig.json .
# COPY --chown=node:node tsup.config.ts .
# COPY --chown=node:node prisma/ prisma/
COPY --chown=node:node src/ src/

RUN yarn install --immutable
# RUN yarn run build

# ================ #
# Runner Stage #
# ================ #

# FROM base AS runner

ENV NODE_ENV="production"
ENV NODE_OPTIONS="--enable-source-maps"

# COPY --chown=node:node src/.env src/.env
# COPY --chown=node:node --from=builder /usr/src/app/dist dist

# RUN yarn workspaces focus --all --production

# Patch .prisma with the built files
# COPY --chown=node:node --from=builder /usr/src/app/node_modules/.prisma node_modules/.prisma

RUN chown node:node /usr/src/app/

USER node

CMD [ "yarn", "run", "watch:start" ]
# ================ #
# Base Stage #
# ================ #

FROM node:20-bullseye-slim as base

WORKDIR /usr/src/app

# ENV YARN_DISABLE_GIT_HOOKS=1
ENV CI=true
ENV LOG_LEVEL=info
ENV FORCE_COLOR=true

RUN apt-get update && \
apt-get upgrade -y --no-install-recommends && \
apt-get install -y --no-install-recommends build-essential python3 dumb-init && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* && \
apt-get autoremove

COPY --chown=node:node yarn.lock .
COPY --chown=node:node package.json .
COPY --chown=node:node .yarnrc.yml .
COPY --chown=node:node .yarn/ .yarn/

ENTRYPOINT ["dumb-init", "--"]

# ================ #
# Builder Stage #
# ================ #

FROM base as builder

# ENV NODE_ENV="development"

# COPY --chown=node:node tsconfig.base.json .
COPY --chown=node:node tsconfig.json .
# COPY --chown=node:node tsup.config.ts .
# COPY --chown=node:node prisma/ prisma/
COPY --chown=node:node src/ src/

RUN yarn install --immutable
# RUN yarn run build

# ================ #
# Runner Stage #
# ================ #

# FROM base AS runner

ENV NODE_ENV="production"
ENV NODE_OPTIONS="--enable-source-maps"

# COPY --chown=node:node src/.env src/.env
# COPY --chown=node:node --from=builder /usr/src/app/dist dist

# RUN yarn workspaces focus --all --production

# Patch .prisma with the built files
# COPY --chown=node:node --from=builder /usr/src/app/node_modules/.prisma node_modules/.prisma

RUN chown node:node /usr/src/app/

USER node

CMD [ "yarn", "run", "watch:start" ]
version: '3.9'

services:
lyra:
build:
context: ../
volumes:
- .:/usr/src/app
container_name: lyra
logging:
options:
max-size: '1g'
max-file: '3'
networks:
- infi
restart: always
tty: true
image: healthcareusa/lyra:latest

networks:
infi:
version: '3.9'

services:
lyra:
build:
context: ../
volumes:
- .:/usr/src/app
container_name: lyra
logging:
options:
max-size: '1g'
max-file: '3'
networks:
- infi
restart: always
tty: true
image: healthcareusa/lyra:latest

networks:
infi:
35 replies
SIASapphire - Imagine a framework
Created by Songbird on 12/30/2023 in #sapphire-support
Get message text from ContextMenuCommandInteraction
Another noob question, sorry! Pretty much title. I have tried parsing the JSON object and using fetchReply() but I believe that is for the reply generated by the bot.
13 replies
SIASapphire - Imagine a framework
Created by Songbird on 12/30/2023 in #sapphire-support
How can I find out what events there are, and what the args are?
For example, MentionPrefixOnly has run(message: msg), but what does anything else have? I have tried creating a listener for adding reactions but I am unsure if this is the proper syntax. sapphire generate listener generates a listener different than the default MentionPrefixOnly listener. I have tried scouring the documentation but I cannnot find anything relating to the arguments of run(). Thank you!
10 replies
SIASapphire - Imagine a framework
Created by Songbird on 12/27/2023 in #sapphire-support
Template project (Issues setting up from scratch)
is there a skeleton sapphire project somewhere? I am having issues setting up even this https://www.sapphirejs.dev/docs/Guide/getting-started/getting-started-with-sapphire with typescript. something about node:31148) Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension. and TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".ts" for D:\Documents\Git Projects\Lyra-Bot\src\index.ts when switching the index.js extension to .ts. I am using node 20.10.0. thank you!
15 replies