Code Monkey home page Code Monkey logo

squadbot's Introduction

Squad Bot

A Discord bot for you and your squad

Testing locally

  1. Create a bot on the Discord developer portal,
  2. Create a webhook on your own discord server by following this tutorial,
  3. Copy the src/config.example.json from the project to src/config.json and fill in the gaps with the information from the bot and the webhook. The first token is on the bot page accessed from the side of the Discord Developer Portal, and the webook information is found on the page when you navigate to the webhook url,
  4. Invite your dev bot to your server by following this url, replacing the client id with your bot's client id (found on it's general information page), and the permissions with the Permission Integer created in the Developer Portal as you select permissions for your bot,
  5. Once these steps are setup, simply run yarn install and yarn run dev from the terminal in the root directory of the repo,
  6. Test the bot is connected by running <your-prefix>ping. It should then respond with "Pong" to show you that it is online and connected.

License

This project is open source and available under the MIT

squadbot's People

Watchers

 avatar

squadbot's Issues

setup a database to start keeping track of some server stats

Could keep track of some things like

  • Number of times certain words are used
  • most active users
  • users quickest to respond to announcements, stream going live, etc.
  • etc.

For this issue, just adding a database is plenty, as long as it has one sample endpoint so that people can easily add more

organize commands into subfolders

Move each command into subfolders by command category. For example, the ping and server-info commands could under "User" while deletemessages could be under "Moderator" or "Admin".

Fix typescript import issues

There are some issues following the discord.js tutorial but building it in typescript. Sometimes when I try to change the require statements to imports, errors come up.
You can see in bot.ts as well as deletemessages.ts, there are still require statements. We should figure out how to change those to imports and fix the errors that come up.

change help command

change help command to dm the response and delete the command message.

look into making a util function that does this that can be called from anywhere

add help command

Add a help command to the bot that returns usage information for commands.

Have it iterate through the commands file, similar to how the bot does it, and print out command usage and information. Add this necessary information to each command file, where the name and description are. Make the description useful to know what the command does, and add the exact command to use with the prefix.

Also, ignore any commands that require permissions in this, unless the user has that permission.

setup a testing framework

Add at least one test as an example to make it easier for others
Add a section in the README about how to add and run tests

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.