yewshanooi / sodium

Open source discord bot with application commands and a user-friendly interface
https://skyelements.github.io/sodium.html
MIT License
10 stars 4 forks source link
bot bots discord discord-bot discord-js fun javascript moderation nodejs utility

Sodium

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

Latest Version   Repository Size   Last Commit   Code Quality


Features

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 | remove | 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.15.0 is required

npm Packages
@google/generative-ai@0.14.1 chalk@4.1.2
discord.js@14.15.3 dotenv@16.4.5
eslint@9.6.0 mathjs@13.0.2
mongodb@6.8.0 mongoose@8.4.4
node-fetch@2.7.0


Guide

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

    [!NOTE] Ignore this step if you already have nodemon installed

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

    [!WARNING] The embedColor field is required

    {
    "embedColor": ""
    }
  5. 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=
  6. 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
  7. 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. In Installation tab, enable Guild Install option under Authorization Methods

  3. In Bot tab, enable Presence Intent and Server Members Intent options under Privileged Gateway Intents

  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/oauth2/authorize?client_id={CLIENT_ID}&permissions=1497295481975&integration_type=0&scope=bot+applications.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