Package: qsbot
qsbotAn extension of the discord.py library that makes the initial creation of a bot's code much easier.FeaturesBuilt in functions for easy 'react for role' setupSet welcome message and discord presenceSet single or multiple prefixes for commandsBuilt in command error catch (Probably will end up phasing this out or replacing it with something more practical)Generate starting code from the command lineRoadmapBasic examplesCommand to install examplesCommand to get basic starting code for bot creationServer statisticsCog supportEasy load tokenInstallNot yet on PyPI, I am waiting until this has more features before I add it there, but if this gets some stars then I may consider adding it early. You can still clone this repo and install from there though.git clone https://github.com/Dual-Exhaust/qsbot

cd qsbot

pip install .qs_install_examplesA command line function that creates a sub-directory containing the qsbot examples in the current working directory.Usage: qs_install_examplesmakebotA command line function that generates code for you to start with.Usage: makebotOptional arguments-F  | --filename : The name of the file generated. If not specified, it will be 'basic_bot.py' by default.-W  | --welcome  : The welcome message that your bot should send to new members.-P  | --prefix   : The prefix that your bot should use, if not set it is '$' by default.-Pr | --presence : The discord presence of your bot.-R  | --react    : How many 'react for role' calls to generate.qsbot.clientThe commands.Bot class from discord.ext.commands is the super class to this one, so initializing is virtually the same.
Note that the default command prefix is set to '$' so you do not have to set one on initialization.client = qsbot.client(command_prefix='$', *args, **kwargs)Reaction for RolesThe logic behind adding and removing a reaction to add and remove a role is provided by default. You just have to pass what channel you want to listen to and specify what reactions give which roles.set_reaction_for_role_channelUsed to set which channel that the bot will listen to for when users add reactions to gain roles in the server. This must be set before you can use add_reaction_for_role. The channel can be passed as a channel id or as a channel name.Usage: client.set_reaction_for_role_channel( <channel> )add_reaction_for_roleUsed to link what reactions give which roles. The first parameter is the reaction name and the second is the role name. These are case sensative and as far as I know only work with custom emojis at the moment.Usage: client.add_reaction_for_role( <reaction name>, <role name> )Prefixesset_prefixesUsed to overwrite the default command prefix. This can be passed a single string or a list of strings to set a single or multiple prefixes respectively.Usage: client.set_prefixes( <prefixe(s)> )get_prefixesUsed to return what the current prefixes are. Currently broken, and may also be a duplicate method of commands.Bot.get_prefix.Usage: client.get_prefixes()Presenceset_presenceUsed to set the bots presence in discord. The parameter is a string. Custom statuses have not yet been looked at.Usage: client.set_presence( <presence> )Welcome Messageset_welcome_messageSets the welcome message that is sent to the user when they join the server. If this is not set then the default behavior is to send no welcome message. The command can be passed a discord.Embed object or a regular string.Usage: client.set_welcome_message( <welcome message> )get_welcome_messageSimply returns the set welcome message. Returns None if it has not been set.Usage: client.get_welcome_message()On Readyset_on_ready_messageSets the message that gets printed to console when on_ready gets called.Usage: client.set_on_ready_message( <message> )get_on_ready_messageReturns the message that gets printed when on_ready triggers. Returns None if not set.Usage: client.get_on_ready_message()on_readyWhen this triggers, the on_ready_message is printed to console and if a presence has already been specified, then it gets set. It does trigger at some odd times though, read thedocsfor more info about it.Command Error Behavioron_command_errorA default command error is included; however, I may be leaning towards disabling it by default and making it have to be enabled. Sends the discord user the error that occured during calling a command. The default behavior is bound to change as this is impractical.