modulepackage
5.0.1-alpha+incompatible
Repository: https://github.com/whitman-colm/go-discord.git
Documentation: pkg.go.dev
# README
discord
SkilStak's discord bot.
About
skilbot® is a golang moderation and integration bot for SkilStak®'s Discord server. It helps to register users and link them with their IRL name, posts updates from github repos and Mr. Rob's blog to appropriate channels and logs deleted messages.
Files
Along with the go files that... well are the bot, the bot needs a json file to tell it what it likes and who it is. An example one is provided (titled preferences.json) but note that the authentication fields are empty (so our bot doesn't get hijacked)
Changing the SkilBot used on the server
Although this repo isn't exactly the source code for the real SkilBot, we would be happy to take in any suggestions for the bot. Simply fork this and put in a pull request. If its accepted it will be put onto the real skilbot.
EOF
# Functions
# Check if item is in array
* This function checks if a value is in a slice (string only)
*
* Parameters:
* - list ([]string) | the slice to be checking against
* - item (string) | the item looked for in the slice
*
* Returns:
* - bool | If the item was found or not
*
* NOTE: If another Contains() funciton is needed for a different type, rename
* this function to ContainsSliceString() and the other function to
* ContainsSlice<T>() where <T> is the generic type.
# Get the guild a message was sent in.
Checks if user has permission to run a command
* This function is a wrapper to check if a user has the permission needed to
* run a given command.
a stupid, inefficent function to get a role from its id.
# Type aliases
Defines the actual action the bot takes
* This is a key component of the Command struct, it is the actual *thing* that
* the command does when it is run.