Skip to content

Open source discord bot with application commands and a user-friendly interface

License

Notifications You must be signed in to change notification settings

yewshanooi/sodium

Repository files navigation

Sodium

Open source discord bot with application commands and a user-friendly interface

Latest Version   Repository Size   Last Commit   Code Quality


Features

  • Application Commands, Buttons, and Message Embed
  • AI Chatbot (powered by Google)
  • Moderation Logs (stored using MongoDB)
  • Third Party API commands (such as Giphy, Nasa, Wikipedia and more!)
  • Watch Together (with YouTube Activity)

Commands

Fun Moderation Utility
8ball, achievement, beep, coinflip, color, compliment, diceroll, fact [cat | dog | general | useless], fortnite, giphy, hypixel, leagueoflegends, lyrics, meme, minecraft, nasa, pokemon, rps, say, spotify, urban, waifu, word, youtube ban, channel [delete | lock | rename | unlock], deafen, kick, logs [add | initialize | view], purge, role [add | remove], setnick, slowmode, timeout, unban, undeafen, untimeout, warn afk, announce, botpresence, botsetnick, calculator, crypto, dictionary, gemini, github, guildrename, help, info [channel | client | guild | role | user], invite, leave, message, news, npm, ping, qrcode, thread, weather, wikipedia

Dependencies

Node.js

Node.js version ≥20.9.0 is required

npm Packages
@google/[email protected] [email protected]
[email protected] [email protected]
[email protected] [email protected]
[email protected] [email protected]
[email protected]

Guide

Configuration Files
  1. Clone this repository to your local drive
git clone https://github.com/yewshanooi/sodium.git
cd sodium
  1. Install the required npm packages
npm install
  1. Install the nodemon npm package globally

Note

Ignore this step if you already have nodemon installed

npm install -g nodemon
  1. Create a new file named config.json and fill it with your own information

Warning

The embedColor field is required

{
  "embedColor": ""
}
  1. Create a new file named .env and fill it with your own variables

Warning

The TOKEN, MONGODB_TOKEN, CLIENT_ID, and GUILD_ID fields are required, while the rest are optional. With missing fields, certain features might not work as intended

TOKEN=
MONGODB_TOKEN=
CLIENT_ID=
GUILD_ID=
DEBUG_CHANNEL_ID=
ERROR_CHANNEL_ID=
WARNING_CHANNEL_ID=
FORTNITE_API_KEY=
GENIUS_API_KEY=
GIPHY_API_KEY=
GOOGLE_API_KEY=
HYPIXEL_API_KEY=
NASA_API_KEY=
NEWS_API_KEY=
OPENWEATHERMAP_API_KEY=
RIOTGAMES_API_KEY=
  1. Run the commands.js file to deploy or delete application commands

Important

Commands are only deployed or deleted for a single guild by default. You can deploy all commands or a single command, but you can only delete all commands

node commands.js deploy    -or-    node commands.js deploy {command}
node commands.js delete
  1. Run the index.js file to start the bot

Warning

Don't forget to deploy commands before starting the bot, otherwise commands won't appear as they are not updated

node index.js    -or-    npm start    -or-    nodemon
Bot & Application
  1. Visit Discord Developer Portal to create a new application

  2. Enable PUBLIC BOT authorization flow option for the bot (OPTIONAL)

  3. Enable PRESENCE INTENT and SERVER MEMBERS INTENT privileged gateway intent options for the bot (REQUIRED)

  4. Paste this OAuth2 URL template in your browser's address bar and replace {CLIENT_ID} with your Client ID to invite the bot to your guild

https://discord.com/api/oauth2/authorize?client_id={CLIENT_ID}&permissions=1497295481975&scope=bot%20applications.commands
OAuth2 URL Scopes & Bot Permissions


License

This application is licensed under the MIT License

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR 
THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Contributors