The purpose of this project is to update the proposal bot to provide a more convenient and user-friendly experience.
Project Benefits
This project enhances the original proposal bot, making it easier for users to create, manage, and interact with proposals on a Discord server.
How the Project Works
The project uses Node.js to create an updated Discord bot with improved features and usability for managing proposals on a Discord server.
Repository and Installation
To install and use the project:
-
Clone the repository:
Terminal window git clone https://github.com/Fulldroper/propozicii-v2cd propozicii-v2 -
Install dependencies and start the bot:
Terminal window npm installnpm start
Project Workflow
-
Setup Project: Initialize the project structure and dependencies.
Terminal window npm initnpm install -
Create Discord Bot: Set up the bot to connect to Discord and listen for proposal commands.
// env configurationprocess.env.NODE_ENV || await require('dotenv').config({ debug: false })// req discord frameworkconst { Client, GatewayIntentBits } = await require('discord.js');const importer = await require('fd-importer');// init discord bot && rest objconst bot = new Client({ intents: [GatewayIntentBits.Guilds,GatewayIntentBits.GuildMessages,GatewayIntentBits.MessageContent,GatewayIntentBits.GuildMembers,GatewayIntentBits.GuildIntegrations] });// set datebase collection namebot.collection = process.env.npm_package_name -
Implement Proposal Features: Add functionalities for creating and managing proposals.
// add event listenerslet temp = await importer('src/events/', {debug: process.env.DEBUG})for (const event in temp) {bot.on(event, temp[event])}// add custom methodstemp = await importer('src/methods/', {debug: process.env.DEBUG})for (const method in temp) {bot[method] = temp[method]}// clear datadelete temp// run botbot.login(process.env.TOKEN)
Skills Gained
- Developing Discord bots with Node.js
- Implementing enhanced proposal management features
- Managing and configuring bot settings for improved user experience