By Jacob Brasil
The SDNE Bot or Syndey is a Discord Bot built for the Software Design & Network Engineering program's Discord Server. The Bot allows users to set their roles such as year & campus as well as interact with the bot to provide functionality not available in a vanilla Discord server.
- Updated to Discord.js v12
- Reaction based interaction system
- Commands available based on permissions instead of role
- Uses database to save user info and get configurations
- React to a message with 📌 to save it
- Bot automatically welcomes new users once they assign a role for the first time
- Automatic Kick/Ban System based off warnings
- Install the latest version of node and include npm when installing - https://nodejs.org/en/
- Install Typescript
> npm install -g typescript
> npx tsc
- Install sqlite - https://www.servermania.com/kb/articles/install-sqlite/
- Clone/Fork Github repo and make the appropriate changes
- Under the root directory, create an empty
database.db
file
- Under the root directory, create an empty
- Create test Discord server if you don't already have one
- Create a new application under the Discord developers portal
- Add a new application
- Open the Bot tab and make a new bot
- Turn off the public bot option (so then only you can invite the bot)
- Invite your bot to the new server
- In the General Information tab, copy your Client ID
- Replace
<CLIENT_ID>
in the following URL with your Client ID above and navigate to the URLhttps://discordapp.com/api/oauth2/authorize?client_id=<CLIENT_ID_HERE>&permissions=8&scope=bot
- Invite your bot to the testing server made in step 4.1
- Under
Server Settings > Roles
, add the roles that can be found inenv.example.ts
- Create three catagories (respective for the different years) and copy their ids
- Update the yearChannels values in
env.ts
eith their respective ids
- Update the yearChannels values in
- Create a channel for the remaining channel variable in
env.ts
, copy their ids and paste them respectively
- Duplicate the
env.example.ts
toenv.ts
- Edit
env.ts
- Add your Bot Token from the developers portal to botToken value
- After the roles are added to your server, make sure to copy the id and then pase to the respective role entry under
env.ts
- Once ready, run the following command and you're ready!
> npm start
(if that doens't work,tsc bot.ts; node bot.js
) - Create a new channel that will be used for the assign roles channel and then run the following command
!assignInfo
(this will place the assign embed in the channel)
Install steps adapted from the following locations