(!! End of Life !!) FoxCodeBot | Discord [Tickets, ReactionRoles, WelcomeMessages, Suggestions, ...] icon

(!! End of Life !!) FoxCodeBot | Discord [Tickets, ReactionRoles, WelcomeMessages, Suggestions, ...] -----

Modular Discord bot written in Python, self-hosted solution




Hey there, after a long time I am adding something new! It's a giveaway module, suggested by many of you.

You can download the module from main page as usual. Please, note that you should also update bot's main files - database.py to be specific - in order to make the new module work correctly.

Update steps:
  • Replace old database.py with new one
  • Add the new module if you want to use it
  • Configure the module
  • Restart the bot
Feel free to contact me if you run into any issues!
----------, Nov 26, 2022

Hey there, I have updated the Reaction roles, now the bot can display selectors as SelectMenus :)
upload_2022-9-8_20-27-49.png

You can keep using reactions as well, or combine it.

To be able to use this feature, you'll have to update the module and its config.

Update steps:
  • Download new version of the module, unzip, replace reactionRoles.py
  • Update your configuration as shown bellow (add new lines):
    upload_2022-9-8_20-31-22.png
    Code (YAML):
    selector-creation-admin-role : Administrator

    role-added-embed
    :
      enabled
    : true
      send-to
    : channel # possible values: 'dm' = user's direct messages, 'channel' = the channel of selector
      embed-title
    : "Role added, {user}"
      embed-description
    : "New role **{role}** has been added to your account!"
      embed-footer
    : "FoxCode Reaction Roles"
      embed-color
    : 0x00ff00

    role-removed-embed
    :
      enabled
    : true
      send-to
    : channel # possible values: 'dm' = user's direct messages, 'channel' = the channel of selector
      embed-title
    : "Role removed, {user}"
      embed-description
    : "Role **{role}** has been removed from your account!"
      embed-footer
    : "FoxCode Reaction Roles"
      embed-color
    : 0xff0000

    another-role-required-embed
    :
      send-to
    : dm # possible values: 'dm' = user's direct messages, 'channel' = the channel of selector
      embed-title
    : "Another role required, {user}"
      embed-description
    : "Sorry, you have to have **{required_role}** before you can acquire this role."
      embed-footer
    : "FoxCode Reaction Roles"
      embed-color
    : 0xff0000

    selectors
    :
      rules
    : # This is the selector name
        type
    : reaction     # Possible values: reaction/menu
        select-menu-title
    : "Agree to rules:"
        embed-title
    : "Server Rules"
        embed-description
    : "Please, agree to our server rules by clicking the confirm button."
        embed-footer
    : "FoxCode Reaction Roles"
        embed-color
    : 0x00ff00
        options
    :
          agreeRules
    :
            name
    : "Accept Rules"
            description
    : "Select this to receive RulesAccepted role."
            emoji
    : "✅"
            role
    : RulesAccepted
      multi-role-selector
    : # This is the selector name
        type
    : menu     # Possible values: reaction/menu
        select-menu-title
    : "Select your role:"
        embed-title
    : "Select your role:"
        embed-description
    : " - Role 1\n - Role 2"
        embed-footer
    : "FoxCode Reaction Roles"
        embed-color
    : 0x00ff00
        only-one-role
    : true # If set to true, user will be able to only select one role from the selector
        options
    :
          Role1
    :
            name
    : "Some Role"
            description
    : "Select this to receive some role."
            emoji
    : ""
            role
    : Role1
            required-role
    : RulesAccepted # The user has to have RulesAccepted role to be able to get the Role1 role
          Role2
    :
            name
    : "Another Role"
            description
    : "Select this to receive another role"
            emoji
    : ""
            role
    : Role2
  • Restart the bot :coffee:
----------, Sep 8, 2022

Hey! Today I am bringing to you a slightly bigger update. I have updated the bot to use the latest version of Discord.py. This enables us to use some custom features Discord added over past few months.

From now all commands should be accessible via prefixed commands (-command) as well as slash commands (/command).

I will also be adding some custom interaction objects such as select menus etc.

There are no changes in configs (except for one more option in Tickets module), but you will be required to update all .py files.

Update steps:
  • Download the latest version of the bot and all of the modules you use
  • Unzip
  • Replace all .py files with new ones, don't forget to include the utils.py in the base of the bot
  • Update the pip packages, remove those which are not needed anymore:
    Code (Text):
    pip3 install --upgrade discord.py
    pip3 uninstall discord-ui discord-components
  • If you are using tickets module:
  • Add the following section to the ticketsConfig.yml
    Code (YAML):
    # Available placeholders:
    # - {ticket_count} - Number of the ticket
    # - {creator} - Name of the user that created the ticket
    # - {category_name} - Name of the category the ticket was created for
    ticket-channel-name-format
    : "Ticket {ticket_count}"
  • Update pip package:
    Code (Text):
    pip3 install --upgrade chat-exporter
  • Restart the bot :coffee:
  • You may need to reinvite the bot with applications.commands scope to be able to use the slash commands
If you run into any issues, feel free to contact me via our support discord server! ;) Cheers!
----------, Sep 4, 2022

Hey, this is a quick bugfix for yesterdays update, the new library overwrites some functions which caused some issues. It should be fixed now.

Update steps:
  • Download new version
  • Unzip, replace old main.py with new one
  • Restart the bot :coffee:
If you have any questions or suggestions, feel free to contact me via our Discord server! Cheers!
----------, Aug 16, 2022

Hello. There has been an unfortunate change recently. One of the libraries the bot is using was wiped out of the internet (discord-components). That means it is not possible to install the library for new users. Apparently it was moved under discord-ui library. And that is what this update is all about, I have updated the bot to use the discord-ui instead.

Currently this includes changes in main.py and Tickets module. No other modules are affected.

You don't really have to update if you are already running these modules, this update does not bring any new features, just keeps the bot in working condition for everyone, especially new users.

Update steps:
  • Download new version of the bot and Tickets module, unzip it, replace main.py and tickets.py with new one.
  • Install new python package:
    Code (Text):
    pip install discord-ui
  • Restart the bot :coffee:
----------, Aug 15, 2022

Hello, after a long time I am finally back with a tiny update. It adds new module, StatusChanger, which can simply rotate between multiple bot status messages.

Also there was a change made to GasTracker module, it now uses Etherscan API.

Update steps:

  • Drop new unzipped module files into your modules folder
  • Edit the module configs to your liking
  • Restart the bot :coffee:
If you have any questions, feel free to ask on our Support Discord server! :) Cheers!
----------, Jul 20, 2022

Hello, I have implemented some of your wishes, have fun!
I am willing to do any adjustments you like, you can submit your requests on our Discord server.

Update steps:
  • Download new bot files, replace database.py with new one
  • Install the modules you like as usual
    (Please, note that GasTracker requires new python library "requests")
  • Restart the bot

In case of any questions/issues feel free to contact me via our Discord server!
----------, May 9, 2022

Hello, this is a quick bugfix for ReactionRoles module. There was an issue with required role handling fixed and also the module now accepts role IDs as well as role names in the configuration.

Update steps:
  • Replace old reactionRoles.py with new one
  • Restart the bot :coffee:

If you have any questions, feel free to join our discord server! Have a nice day!
----------, May 3, 2022

Hello, this is just a quick update that adds new options to ReactionRoles module, thanks to @Neonn_Bukkit for suggesting these!

You can now use required-role: SomeRole in the selector option so that the user needs to have this role before getting the new one.
Also you can now create selector where selecting only one of the roles is possible using only-one-role: true option.

See the examples below :)

Update steps:
  • Replace the old reactionRoles.py with the new one
  • Adjust your config if you want to use these new features, add this section to the config:
    Code (YAML):
    role-removed-embed:
      enabled
    : true
      send-to
    : dm # possible values: 'dm' = user's direct messages, 'channel' = the channel of selector
      embed-title
    : "Role removed, {user}"
      embed-description
    : "Role **{role}** has been removed from your account!"
      embed-footer
    : "FoxCode Reaction Roles"
      embed-color
    : 0xff0000
  • Restart the bot
Code (YAML):
selector-creation-admin-role : Administrator

role-added-embed
:
  enabled
: true
  send-to
: dm # possible values: 'dm' = user's direct messages, 'channel' = the channel of selector
  embed-title
: "Role added, {user}"
  embed-description
: "New role **{role}** has been added to your account!"
  embed-footer
: "FoxCode Reaction Roles"
  embed-color
: 0x00ff00

role-removed-embed
:
  enabled
: true
  send-to
: dm # possible values: 'dm' = user's direct messages, 'channel' = the channel of selector
  embed-title
: "Role removed, {user}"
  embed-description
: "Role **{role}** has been removed from your account!"
  embed-footer
: "FoxCode Reaction Roles"
  embed-color
: 0xff0000

another-role-required-embed
:
  send-to
: dm # possible values: 'dm' = user's direct messages, 'channel' = the channel of selector
  embed-title
: "Another role required, {user}"
  embed-description
: "Sorry, you have to have **{required_role}** before you can acquire this role."
  embed-footer
: "FoxCode Reaction Roles"
  embed-color
: 0xff0000

selectors
:
  rules
: # This is the selector name
    embed-title
: "Server Rules"
    embed-description
: "Please, agree with our server rules by clicking the confirm button."
    embed-footer
: "FoxCode Reaction Roles"
    embed-color
: 0x00ff00
    options
:
      agreeRules
:
        emoji
: "✅"
        role
: RulesAccepted
  multi-role-selector
: # This is the selector name
    embed-title
: "Select your role:"
    embed-description
: " - Role 1\n - Role 2"
    embed-footer
: "FoxCode Reaction Roles"
    embed-color
: 0x00ff00
    only-one-role
: true # If set to true, user will be able to only select one role from the selector
    options
:
      Role1
:
        emoji
: ""
        role
: Role1
        required-role
: RulesAccepted # The user has to have RulesAccepted role to be able to get the Role1 role
      Role2
:
        emoji
: ""
        role
: Role2

If you have any questions, feel free to ask on our Discord server! Have a nice day!
----------, Apr 29, 2022

Hello, this update does not add any new features, though it is still an important update in my opinion. I have updated the code to meet the PEP 8 language standards. Also there was some code cleanup and optimization made.

It should help to make the code well maintainable in long term and also unify the code style, therefore make it easier for other people to understand it.

It requires updating all of your .py files since there was some method renaming done.

Update steps:
  1. Redownload and replace all .py files you currently have (main.py, database.py and all module .py-s)
  2. Restart the bot

I am sorry to bother you with this update though I think it is better to do this now than later or even never... Thanks for understanding!

If you have any questions, feel free to join on our discord server! Have a nice day!
----------, Apr 26, 2022

Hello everyone, I made another small update. The bot should now handle unknown commands properly. The update requires editing config.yml, see below.

I have also implemented new features for Tickets, you can now limit ticket categories by user role. Also there is new option to enable confirmation for ticket closing. Thanks to @Neonn_Bukkit for suggesting these features.

Update steps:
-- FoxCodeBot v1.2 --
  1. Replace main.py with new one
  2. Add new lines to config.yml
    Code (YAML):
    # Unknown command handling
    remove-unknown-commands
    : true

    command-not-found-embed
    :
      enabled
    : true
      title
    : "Unknown command"
      description
    : "Unknown command, try again."
      color
    : 0xff0000
  3. Restart the bot
-- Tickets v1.7 --
  1. Replace old tickets.py with new one
  2. Add new lines to ticketsConfig.yml
    Code (YAML):
    require-close-confirmation : true # If set to true, confirmation message will appear on every ticket close


    missing-role-embed
    :
      embed-title
    : "Missing role"
      embed-description
    : "You need the {role} role to create new ticket in this category!"
      embed-colour
    : 0xff0000
      embed-footer
    : "FoxCode Ticket System"

    confirm-close-embed
    :
      embed-title
    : "Confirmation"
      embed-description
    : "Do you really want to close this ticket?"
      embed-colour
    : 0xFFA500
      embed-footer
    : "FoxCode Ticket System"
      confirm-button
    : "Confirm"
  3. Optionally you can now add required-role: <role> to ticket categories
  4. Restart the bot
Code (YAML):
##########################
#  DISCORD BOT SETTINGS  #
##########################

bot-token
: put-your-token-here
bot-activity
: "Managing the server"

database
:
  host
: localhost
  port
: 3306
  databaseName
: FoxCodeBot
  user
: FoxCodeBot
  password
: superSecretPassword

# Unknown command handling
remove-unknown-commands
: true

command-not-found-embed
:
  enabled
: true
  title
: "Unknown command"
  description
: "Unknown command, try again."
  color
: 0xff0000
Code (YAML):
maximum-tickets-per-user : 3
ticket-creation-admin-role
: Asistant
ticket-channel-category
: Tickets
ping-admin-role-on-creation
: true
ping-admin-role-on-user-response
: true
send-transcription
: true
transcript-description
: "Hello, I'm sending you a transcription of your ticket (in case you need it), thanks for using our ticket system."
transcript-channel
: 927152451423977482 # If there is channel ID defined, it will save transcripts of all tickets here
require-close-confirmation
: true # If set to true, confirmation message will appear on every ticket close

ticket-creator-embed
:
  embed-title
: "Create new ticket"
  embed-description
: "To create ticket, please react with button that corresponds to your issue category."
  embed-colour
: 0xFFA500
  embed-footer
: "FoxCode Ticket System"

ticket-created-embed
:
  embed-title
: "Ticket created!"
  embed-description
: "Your ticket was created: {channel}"
  embed-colour
: 0x00ff00
  embed-footer
: "FoxCode Ticket System"

too-many-tickets-embed
:
  embed-title
: "Too many tickets!"
  embed-description
: "Please, close some other ticket, before creating new one."
  embed-colour
: 0xff0000
  embed-footer
: "FoxCode Ticket System"

ticket-management-embed
:
  embed-title
: "{channel-name}"
  embed-description
: "{instructions}"
  embed-colour
: 0xFFA500
  embed-footer
: "FoxCode Ticket System"
  close-button
: "Close ticket"

missing-role-embed
:
  embed-title
: "Missing role"
  embed-description
: "You need the {role} role to create new ticket in this category!"
  embed-colour
: 0xff0000
  embed-footer
: "FoxCode Ticket System"

confirm-close-embed
:
  embed-title
: "Confirmation"
  embed-description
: "Do you really want to close this ticket?"
  embed-colour
: 0xFFA500
  embed-footer
: "FoxCode Ticket System"
  confirm-button
: "Confirm"

categories
:
  general
:
    admin-role
: Asistant
    name
: General ticket
    emoji
: '❤'
    instructions
: "Thanks for contacting us via ticket system! While waiting for our staff to take care of you, please, tell us more about the problem."
    required-role
:   # Leave blank if everyone should be able to open ticket in this category
  bug_report
:
    admin-role
: Asistant
    name
: Bug report
    emoji
: ''
    instructions
: "Thanks for contacting us via ticket system! While waiting for our staff to take care of you, please, tell us more about the bug."
    required-role
:
  feature_request
:
    admin-role
: Asistant
    name
: Feature request
    emoji
: ''
    instructions
: "Thanks for contacting us via ticket system! While waiting for our staff to take care of you, please, tell us more about what would you like us to implement."
    required-role
: VIP
If you have any questions or need any help, feel free to ask on our Discord server!
----------, Apr 25, 2022

Hello, this update adds a new option for Reaction Roles to send the info about the role added/removed directly to user. It should prevent spam in the selector channel. You can still use the old variant though and it is chosen by default if you don't edit the configuration file.

Reaction Roles update steps:
  • Download new version, replace the old reactionRoles.py with new one
  • You can add new "send-to" option to the config for embeds like this:
    Code (YAML):
    role-added-embed:
      enabled
    : true
      send-to
    : dm # possible values: 'dm' = user's direct messages, 'channel' = the channel of selector
      embed-title
    : "Role added, {user}"
      embed-description
    : "New role **{role}** has been added to your account!"
      embed-footer
    : "FoxCode Reaction Roles"
      embed-color
    : 0x00ff00
    role-removed-embed
    :
      enabled
    : true
      send-to
    : dm # possible values: 'dm' = user's direct messages, 'channel' = the channel of selector
      embed-title
    : "Role removed, {user}"
      embed-description
    : "Role **{role}** has been removed from your account!"
      embed-footer
    : "FoxCode Reaction Roles"
      embed-color
    : 0xff0000
I have also released new module for Direct Messages, you can check it out on the bot's overview. Installation steps are the same as usual.
----------, Apr 21, 2022

Hi, this tiny update should help you troubleshoot MySQL connection errors more easily. Now it should not be so confusing to troubleshoot these issues :)


Update steps:
  • Replace old database.py with new one
  • Restart the bot
----------, Apr 15, 2022

Hehe, I accidentally left my testing token in the config, no big deal, but thanks for letting me know! :) :coffee:
----------, Jan 28, 2022

Hello, I have created new module for selecting roles using reactions. You can get more info in the wiki.

Also the Tickets module got a small update, you can now use Role IDs as well as Role names in config for configuring admin roles.

In case of any errors feel free to contact me via our support Discord server :)

Update steps:
- Replace/Drop new files into your /modules directory
- Restart the bot
----------, Jan 28, 2022

Hi, this update adds new module, also there are some minor changes in main.py

Welcome messages module can send an embed to new users, also it can send a message to defined channel in your Discord server. Everything is customizable. If you would like to change anything about it, contact me via our Discord server.

Also I have created a new wiki page, it should be more organised and simple to use:
https://wiki.foxcodebot.fox-code.eu/

Update steps:
- Replace old main.py with the new one
- Optionally install WelcomeMessages module
- Check that you have bot intents enabled in your bot application:
[​IMG]
- Restart your bot

If you need any help, feel free to contact me! :coffee:
----------, Jan 10, 2022

Hi, this update improves transcripts a lot - it uses external library for generating the transcript, but transcripts now look awesome, they are in html.

Update steps:
- Download new version of Tickets module, replace tickets.py ( Download)
- Install new Python library using
Code (Text):
pip install -U chat-exporter
- Restart the bot
----------, Jan 5, 2022

Hello, just a quick update that adds an option to create tickets in their own channel category, also adds a few checks for errors in configuration.

I am going to make the module even more error-proof soon, so that it won't that painful to try to solve potential issues with config. Also I am planning to rework transripts, so that they can also transcribe embed content, media, emotes etc.

Thanks to @lowatime for feedback!

Update steps:
- Download latest version of Tickets module (Tickets-v1.3), replace tickets.py with new one.
- Add new line to your ticketsConfig.yml:
Code (YAML):
ticket-channel-category : Tickets
- Restart the bot
----------, Jan 4, 2022

Hi, this update improves tickets module once again. Now you have option to get pinged when user creates ticket, or responds in the ticket.

Update steps:
- Download new version of tickets module, replace tickets.py
- Add these 2 lines to your ticketsConfig.yml
Code (YAML):
ping-admin-role-on-creation : true
ping-admin-role-on-user-response
: true
----------, Jan 4, 2022

Hi, this update fixes issue with ticket creation where user wasn't given correct permission to view the ticket channel :rolleyes:

Update steps:
- Download new version of Tickets module, replace old tickets.py with new one :coffee:
----------, Jan 3, 2022

Resource Information
Author:
----------
Total Downloads: 1,743
First Release: Jan 3, 2022
Last Update: Nov 26, 2022
Category: ---------------
All-Time Rating:
5 ratings
Version -----
Released: --------------------
Downloads: ------
Version Rating:
----------------------
-- ratings