2024-07-11

·Visit Project

ELRoyal Bot

A Node.js Discord bot designed to provide a variety of features, including data retrieval and role management after submitting the data. This README will guide you through the setup and configuration of the bot.

Table of Contents

Introudction

ELRoyal-Bot is a Node.js Discord bot designed to provide a variety of features, including data retrieval and role management after submitting the data. This README will guide you through the setup and configuration of the bot.

Variables

Here is a description of each configuration variable:

  • clientId: Your Discord application's client ID. Obtain this from the Discord Developer Portal.
  • clientSecret: Your Discord application's client secret. This is also available from the Discord Developer Portal.
  • token: The bot token used to authenticate the bot with Discord. You can get this from the Discord Developer Portal.
  • redirectUri: The URL where users will be redirected after authentication. Typically used for OAuth2 authentication.
  • guildId: The ID of the Discord server where the bot will operate.
  • linkedRoleId: The ID of the role assigned to users after they link their account with the bot.
  • dataChannelId: The ID of the channel where the bot sends data every 14 days.
  • answersChannelId: The ID of the channel where the bot sends answers or data submissions.
  • welcomeChannelId: The ID of the channel where welcome messages are sent.
  • leaveChannelId: The ID of the channel where messages are sent when a user leaves.
  • ownerIds: An array of user IDs who are considered the bot's owners and have special permissions.
  • whitelistedIds: An array of user IDs who are allowed to access the webview.
  • embedColor: The color used for embeds generated by the bot, in hexadecimal format.
  • successColor: The color used for success messages, in hexadecimal format.
  • errorColor: The color used for error messages, in hexadecimal format.
  • version: The version of the bot.

Commands

  • /link: Generates an embed with "link" and "find" buttons.
    • Link Button: Allows users to link themselves.
    • Find Button: Retrieves data of a "Discord user" using their user ID. If the user hasn't verified, it will display "No data found". If verified, it will show the "answers/data" the user provided in the form.
  • /find: Allows you to find a user's data without using the button.
  • /unlink: Deletes a user's data.

Data Management

  • All user responses are logged via a webhook, enabling them to be sent to any channel on any server.
  • After linking, the bot assigns a role to the user (e.g., linked role).
  • User answers are saved locally in a SQLite database as well as an XLSX sheet.

#Tags

discord
bot
sqlite

Contact

Need more project details, have any doubts in mind, or interested in working together? Reach out to me directly at krushnavyas066@gmail.com. I'd be happy to connect and talk!

← All Projects