Git Product home page Git Product logo

kaogeek-discord-bot's People

Contributors

01110111-wave avatar 3raphat avatar aomkoyo avatar beam41 avatar buskun avatar cloverink avatar corelmax avatar dtinth avatar exitedstate avatar gusb3ll avatar heypoom avatar ipiranhaa avatar kerlos avatar lagseen avatar leomotors avatar narze avatar rayriffy avatar renovate[bot] avatar samithiwat avatar st4rchaser avatar ujwalkumar1995 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

kaogeek-discord-bot's Issues

[FEATURE] Reassign "flag" role for rejoining users.

Overview

Proposed steps:

  1. When user is flagged, we save those user to flag table in db
  2. If user is rejoin, we check against the flag table and reapply the role
  • When user is unflagged, remove those user from flag table

Why you want this feature?

*This is just a quick fix for current issue*

Currently, there are some flagged users making themselves unflagged by leaving the server and rejoining.
Admins suggest that, we should reapply flag role to those who leave with the role.

[BUG] stickao-set crash bot if user have DM disabled

Describe the bug

I plan to test command but it's already merge 😂

Anyways, my main account has DM disable and it's crash the bot.

Log:

Sticky message saved: Hi
error while update sticky message Unknown Message
\kaogeek-discord-bot\node_modules\.pnpm\@[email protected]\node_modules\@discordjs\rest\dist\index.js:640
      throw new DiscordAPIError(data, "code" in data ? data.code : data.error, status, method, url, requestData);
            ^


DiscordAPIError[50007]: Cannot send messages to this user
    at handleErrors (\kaogeek-discord-bot\node_modules\.pnpm\@[email protected]\node_modules\@discordjs\rest\dist\index.js:640:13)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at Object.runRequest (\kaogeek-discord-bot\node_modules\.pnpm\@[email protected]\node_modules\@discordjs\rest\dist\index.js:1021:23)
    at Object.queueRequest (\kaogeek-discord-bot\node_modules\.pnpm\@[email protected]\node_modules\@discordjs\rest\dist\index.js:862:14)
    at EventEmitter.request (\kaogeek-discord-bot\node_modules\.pnpm\@[email protected]\node_modules\@discordjs\rest\dist\index.js:1387:22)
    at DMChannel.send (\kaogeek-discord-bot\node_modules\.pnpm\[email protected]\node_modules\discord.js\src\structures\interfaces\TextBasedChannel.js:162:15) {
  requestBody: {
    files: [],
    json: {
      content: 'Successfully created sticky message.',
      tts: false,
      nonce: undefined,
      embeds: undefined,
      components: undefined,
      username: undefined,
      avatar_url: undefined,
      allowed_mentions: undefined,
      flags: undefined,
      message_reference: undefined,
      attachments: undefined,
      sticker_ids: undefined,
      thread_name: undefined
    }
  },
  rawError: { message: 'Cannot send messages to this user', code: 50007 },
  code: 50007,
  status: 403,
  method: 'POST',
  url: 'https://discord.com/api/v10/channels/.../messages'
}

Node.js v18.16.0
 ELIFECYCLE  Command failed with exit code 1.

To Reproduce

Steps to reproduce the behavior:

  1. Disable dm in discord in Privacy & Safety
    image
  2. try set message using ?stickao-set
  3. Done, your bot will now crash

Expected behavior

Just skip DM if user disabled it, maybe.

Additional context

@samithiwat

Create base Discord Bot

สร้างโครงสร้างพื้นฐานสำหรับการรันบอท discord

DiscordJS Framework - NestJS Discord

I would like to introduce frameworks for implementing Discord bot that is discord-nestjs. It allows us to implement the bot based on NestJS framework which provides greats decorators and separations of layers of logics. We can also implement REST api in it if we want.

migrate from Keyv to Prisma

Overview

migrate data storage from Keyv to Prisma

  • no need to migrate data (just discard old data and use a new database file)
  • use SQLite for now

Why you want this feature?

in the future we may have more complex feature that needs more structured data.

(please comment if you want to do it, so other people know someone is already working on it)

add Vitest to project to allow unit testing some logic

Overview

add Vitest to project to allow unit testing some logic

  • add Vitest to project
  • add a dummy test to verify that Vitest is working, e.g. expect('foo').toBe('foo')
  • add a CI configuration to run Vitest

Why you want this feature?

there are some complex logic, e.g. emoji detection #36. maybe these logic can have automated tests to increase confidence in the system

(please comment if you would like to help, so other people know someone is already working on it)

[FEATURE] Sticky Message in chat

Overview

  1. when set message for sticky in chanel
  2. someone send message in chanel >> sticky message will delete and send sticky messages to the bottom always.

Why you want this feature?

  1. Free StickyBot Free Version can set 3 message

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Rate-Limited

These updates are currently rate-limited. Click on a checkbox below to force their creation now.

  • chore(deps): update actions/checkout action to v4
  • chore(deps): update actions/setup-node action to v4
  • chore(deps): update appleboy/ssh-action action to v1
  • chore(deps): update dependency @types/node to v20
  • chore(deps): update dependency eslint-config-prettier to v9
  • chore(deps): update dependency eslint-plugin-prettier to v5
  • chore(deps): update dependency eslint-plugin-unicorn to v51
  • chore(deps): update dependency prettier to v3
  • chore(deps): update dependency tsup to v8
  • chore(deps): update dependency tsx to v4
  • chore(deps): update docker/build-push-action action to v5
  • chore(deps): update docker/login-action action to v3
  • chore(deps): update docker/setup-buildx-action action to v3
  • chore(deps): update typescript-eslint monorepo to v7 (major) (@typescript-eslint/eslint-plugin, @typescript-eslint/parser)
  • chore(deps): update vitest monorepo to v1 (major) (@vitest/coverage-v8, vitest)
  • fix(deps): update prisma monorepo to v5 (major) (@prisma/client, prisma)
  • chore(deps): lock file maintenance
  • 🔐 Create all rate-limited PRs at once 🔐

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

  • fix(deps): update dependencies (non-major) (@prisma/client, @trivago/prettier-plugin-sort-imports, @types/eslint, @types/humanize-ms, @types/node, @types/node-cron, @types/unzalgo, @typescript-eslint/eslint-plugin, @typescript-eslint/parser, @vitest/coverage-v8, discord.js, dotenv, eslint, eslint-config-prettier, eslint-plugin-import, node-cron, pnpm, prisma, rimraf, tsup, tsx, typescript, vite-tsconfig-paths, vitest, zod)
  • chore(deps): update dependency @tsconfig/node18 to v18

Detected dependencies

asdf
.tool-versions
docker-compose
smoke/docker-compose.yml
dockerfile
Dockerfile
github-actions
.github/workflows/checks.yml
  • actions/checkout v3
  • pnpm/action-setup v2
  • actions/setup-node v3
  • actions/checkout v3
  • pnpm/action-setup v2
  • actions/setup-node v3
  • actions/checkout v3
  • pnpm/action-setup v2
  • actions/setup-node v3
  • davelosert/vitest-coverage-report-action v2
  • actions/checkout v3
  • pnpm/action-setup v2
  • actions/setup-node v3
  • actions/checkout v3
  • docker/setup-buildx-action v2
  • docker/build-push-action v4
.github/workflows/deployment.yml
  • actions/checkout v3
  • docker/setup-buildx-action v2
  • docker/login-action v2
  • docker/build-push-action v4
  • appleboy/ssh-action v0.1.10
npm
package.json
  • @(-.-)/env 0.3.2
  • @prisma/client 4.16.1
  • discord.js 14.11.0
  • dotenv 16.3.1
  • humanize-ms 1.2.1
  • node-cron 3.0.2
  • prisma 4.16.1
  • toml 3.0.0
  • unzalgo 3.0.0
  • zod 3.21.4
  • @trivago/prettier-plugin-sort-imports 4.1.1
  • @tsconfig/node18 2.0.1
  • @types/eslint 8.40.2
  • @types/humanize-ms 1.2.2
  • @types/node 18.16.18
  • @types/node-cron 3.0.8
  • @types/unzalgo 3.0.0
  • @typescript-eslint/eslint-plugin 5.60.1
  • @typescript-eslint/parser 5.60.1
  • @vitest/coverage-v8 0.32.2
  • cross-env 7.0.3
  • eslint 8.43.0
  • eslint-config-prettier 8.8.0
  • eslint-plugin-import 2.27.5
  • eslint-plugin-prettier 4.2.1
  • eslint-plugin-unicorn 47.0.0
  • prettier 2.8.8
  • rimraf 5.0.1
  • tsup 7.1.0
  • tsx 3.12.7
  • typescript 5.1.5
  • vite-tsconfig-paths 4.2.0
  • vitest 0.32.2
  • pnpm >=8.6
  • pnpm 8.6.5
nvm
.nvmrc

  • Check this box to trigger a request for Renovate to run again on this repository

[FEATURE] way to view server logs

Overview

find a way to let developers see the server logs without having to ssh into a server, so they can better debug the bot

Why you want this feature?

right now when debugging issues, to view the logs, i have to ssh into @Gusb3ll’s server and run docker compose logs -f

this means only a handful people are able to debug the system because only few people can access log. giving too many people ssh access can be a security concern. therefore, if we are able to use some hosted log management solution, more people can debug the system

Suggestions

  • my personal favorite would be Papertrail. it is a simple text-based logging system with a free tier. very easy to filter logs using text patterns. the free tier has 50MB/month limit, but each referral would grant an extra 50MB/month for 1 year. i am currently testing out Papertrail with my account, but i am using it with other projects too. it would be great if someone can create a new account so we can have a dedicated account for the bot (let me know so I can send the referral code). since Papertrail supports unlimited team members, we don’t need to share account passwords.

    image
  • another option is to use Loggly. its free plan has 200MB/day limit. however, the UI does not look as good as Papertrail. it also emphasizes structured logging, which is not what we are doing right now. but it is still a good option to consider given a much higher free tier limit.

  • any other suggestions?

cc: @Gusb3ll @ST4RCHASER

[BUG] stickao - sendDM

Describe the bug

morning krubb refer to #141
handle more cases : when users change their minds to disable DMs

To Reproduce

Steps to reproduce the behavior:

  1. turn on setting to allow bot DM
  2. use stickao-set
  3. turn off setting
  4. use stickao-set again

Expected behavior

skip DM

Screenshots

u4zJNZG

Additional context

Enhance nickname special characters detection.

Overview

Some users in ก้าว Geek's discord trying to modify their nickname to start with/only "!" to be sorted at the top of the user list. After this feature rollout, some users try to replace "!" with other special characters are the same range of ASCII code (e.g., $, %, *, etc.). So blocking only the exclamation mark ("!") is not enough.

I have a suggestion for blocking all special characters (ASCII code from 33 to 47) from the nickname with the mentioned condition.

Why you want this feature?

Enhance nickname validation function more effectively according to an objective.

Add .DS_Store to .gitignore

According to #84 (comment)

It's weird that .DS_Store is not there in .gitignore template 😂

To add to .gitignore

  • .DS_Store and __MACOSX
  • package-lock.json because someone insists to use npm (We already have yarn.lock in .gitignore, so group them together will be very nice)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.