Carbon is a Discord bot for the Alka Hangout Discord server. The bot is currently in development and not actively in use on the server yet.
Using Replit
- Import the repository to replit
- Configure the secrets:
TOKEN: Discord tokenMONGODB: MongoDB SRV connection stringANTICRASH: Webhook URL to handle crashes
- Configure the bot to your needs by by going to Configuration
- Click Run
Using Docker
Coming soon...
All configuration are stored in the config file
cli: Strings used in logsstatus_ok: String to represent that something succededstatus_badString to represent that something failed
log: Undocumentedenabled: UndocumentedfilePath: Undocumented
ownerId: The user id of the bot owner (used to give access to blacklist commands)developersId: The user ids of the bot developer (used to give access to blacklist commands)devGuildId: Guild to set commands marked as typeDEVtoicons: Custom emojis used in messages/embedsloading: Undocumentedsync: Used to represent the database status connecting and disconnectingbot: Undocumenteddeveloper: Used as prefix for the username in/about userif the user's id is included indevelopersId
server:owner: Used as prefix for the username in/about userif the user is the owner of the guildverified: Used as prefix for the server name in/about serverif the server is verifiedpartnered: Used as prefix for the server name in/about serverif the server is partnered
alka: UndocumentedbotUsed as prefix for the username in in/about userif the user is a custom bot made for Alka Hangout
blacklist: Emoji used to display the status of a user's blacklistfound: Emoji to show if the user is found in blacklistnotfound: Emoji to show if the user is not found in blacklist
alka: Undocumentedbots: The user ids of bots custom made for Alka Hangout (icons -> alka -> botwill be displayed as a prefix)
userLeveling: Default settings for levelingmin: Minimum amount of XPmax: Maximum amount of XPrequired: XP required to levlup
Go to docs
- Timer for anything that uses timer (ex. tempban, slowmode duration) will disappear if the bot restarts in the middle of the timer running
- Description: When a timer is currently running like someone being temp banned, the bot will use
setTimeout()to unban the user after a specified amount of time. If the bot restarts when the bot is running, the timer will be lost causing the user to never be unbanned - Possible Solutions:
- Store any timer in a database with a date variable of when it should run and the action to execute. Whenever the bot restarts, read all the items in the database and for each item in the database: calculate the remaining time before the timer is triggered and create a
setTimeout()with the remaining time and action. Discord collection can be used to handle the database. The structure of the item can be written like so
In a collection specifically for handling tempbans:{ "UserId" : "id of banned user", "GuildId" : "id of guild the user is banned in", "Trigger" : "timestamp of when the ban will end" }
- Store any timer in a database with a date variable of when it should run and the action to execute. Whenever the bot restarts, read all the items in the database and for each item in the database: calculate the remaining time before the timer is triggered and create a
- Description: When a timer is currently running like someone being temp banned, the bot will use