This is a discord bot written entirely in golang using the discordgo library.
The bot is being moved to CleverFox 2 and CleverFox Rust Edition. Please see my other repositories for the bot. Feature parity will be slowly achieved first with the Go edition and then later with Rust Edition.
The bot itself has a custom command parser and many custom functions. It is a featured bot you can use on your server.
Follow the instructions (first few steps to setup an application) at https://www.freecodecamp.org/news/create-a-discord-bot-with-python/
Get the token and your guildID. Then invite the bot into the guild and give it permissions.
COPY THE config.yml
FILE FROM THE EXAMPLES DIRECTORY -> ROOT NEXT TO WHERE THE MAIN EXECUTABLE IS TO USE, THEN EDIT
IT AND RUN THE BOT
Currently pre-built: LINUX ARM64, LINUX AMD64, WINDOWS AMD64
Coming very soon (support is already done and working!)
The bot automatically checks for any games planned every minute and reminds people the time is due
The bot automatically checks for the time to lock and unlock sendMessage permissions for a given channel and for given roles.
prefix: /
(Discord command system)
You can configure the bot according to your liking, and also disable various modules globally, when hosting.
modules:
# Administration module includes: kick, ban, mute, purgeUsers
administration: false
# Not used right now
logging: false
# Slovak lottery password fetcher.
lottery: false
# Game planning isn't functional currently.
planning: false
# openWeather command /weather
weather: true
# Message purging feature (separate from administration)
purge: false
# API for the COVID info for SVK
COVIDSlovakInfo: true
# Automatic channel unlocking (must specify ID above)
timedChannelUnlock: false
/timeout @mention duration_in_minutes
Timeouts a user. Checks if the user is either an Admin.
/age @mention
checks the age of the user (account age).
/checkusers <hours to check>
checks all the users that connected in less than 24h (by default).
/plan HH:MM game_name @MENTION
Plans and writes a UNIX timestamped time + ID and other data into an entry in SQLite database for later use. Confirms with outputting the entry into the Discord channel.
/planned
SELECT * from planned games table. Outputs into the same Discord channel.
/weather City Name
Check to see the weather information of a particular city. Supports cities with spaces in names. Runs concurrently.
/topic
Outputs a random topic for a discussion.
More features pending, including a docker image and a custom SQLite database for internal event planning.
/kick @user <reason for the kick>
/ban @user <reason for the ban> <days of messages to delete>
Kicks and or bans a user. Posts a message to the log channel defined.
In case of a ban also deletes previous 7 days of the user's messages.
DMs the user the reason and information about his kick/ban.
/version
Displays the version of the bot
/purge NUMBERINT
PurgeTo rightclick deletes up to 100 messages under your selected message.
PurgeToUser does the same but filters the messages to delete only by the user of the message you clicked.
Deletes 1-100 messages in the channel that the command was typed in.
/prunecount NUMBERINT
Checks how many users would be pruned (minimum is 7 days, maximum is undefined, however, for me only 30 worked as max).
/prunemembers NUMBERINT
Prunes members that have been inactive for a set amount of days (minimum 7, max undefined, however, for me only 30 worked as max).
/members
Counts the number of members on the server.
/configreload
This command reloads the config data into memory without restarting the bot.
/setuserperm <allow> <@mention> <PERMID>
Sets the channels permissions. Calculate the permissions here: https://discordapi.com/permissions.html
/setchannelperm <allow> <@role> <PERMID>
Sets the channels permissions. Calculate the permissions here: https://discordapi.com/permissions.html
/redirect #channel
Sets the current channel for a 360 second slowmode, and embeds a new channel for people to write to.
/slow NUMOFSECS (0-21600)
Sets a slowmode in the current channel. 0 seconds don't do anything (bug of Discord) therefore I have set it to autocorrect to 1.
/voicechannelmodify <name> <bitrate>
Changes the name of the channel. Optionally you can specify a bitrate. The bot tries to use the highest possible by default.
Using the public API https://data.korona.gov.sk/ the bot can request a range of data specified by the user in days, and parse it with a very simple ASCII based chart output. Examples below: