Git Product home page Git Product logo

discordbot-alexxoffi's Introduction

AlexxBot

This self-hosted discord bot can auto-moderate, run guild-specific commands and show fancy statistics.
Join the Discord

Report bug · Request feature · Visit Author

This has been discontinued!

The bot is no longer in development.

Table of contents

Prerequisites

Following programs and scripts are required to run this bot:

  • Python >3.7,<=3.8
  • Pip >=18.1
  • Pipenv >=v2020.6.2 (pip install pipenv)

Quick start

  1. Create your bot application at https://discord.com/developers/ and follow all steps to create a bot and invite it to your server
  2. Please note that this bot requires the "Server Members Intent" option or multiple features of this bot will break.
  3. As some statistic-tracking will likely be implemented in the near future, it is recommended to enable the "Presence Intent" option.
  4. It is recommended not to enable the "Public Bot" setting
  5. Clone this repository git clone https://github.com/derdomee/discordbot-alexxoffi.git
  6. Create a file .env from .env.preset and insert your settings, most importantly your discord bot token
  7. Install the virtual environment: pipenv sync
  8. Run the bot with pipenv run start (Or translate and run manually: pipenv run translate && pipenv run bot)

Running with different python versions

This bot is developed and tested in Python 3.7 only, but it should run flawlessly in Python >=3.6. Pipenv forces a single pinned python version as application requirement, thus I can not provide a wider version range for it. Just remove the python requirement in Pipfile or change the value to your desired python version.

Contributing

Feel free to fork this project and create a pull request containing your changes.

discordbot-alexxoffi's People

Contributors

derdomee avatar jani270 avatar

Watchers

 avatar

discordbot-alexxoffi's Issues

Ideas for command 'language', show more information

Is your feature request related to a problem? Please describe.
The language command is very unintuitive and could show more information about the language.
Also: Available languages are hard coded inside the command. This is bad behaviour: The bot should get the language information dynamically from the resources directory.

Describe the solution you'd like
Let help language show all available languages together with translation coverage and localized;unlocalized names.

Skill level challenges

Add a system for Hypixel skyblock challenges regarding skill leveling.

  1. Admins/Mods create a new challenge
    1. Choose the challenge type (Select a skill for leveling)
    2. Choose if challenge is in Auto-Accept-Mode or in Manual-Accept-Mode
    3. Choose start time of challenge
    4. Choose end time of challenge
    5. Choose Pay-In Value
  2. Users can enter the challenge
  3. If Manual-Accept-Mode is enabled, Admins must accept every user for the challenge. (e.g. to check if player payed to join)
  4. 10 Minutes (30 Minutes when Manual-Accepting) before challenge start, entries close.
  5. 1-5 Minutes before challenge start, the bot gathers the current stats for every player
  6. Challenge starts
  7. During the challenge, players can check their progress (maybe I will add a runtime-leaderboard, not sure yet)
  8. Challenge ends and bot creates a final leaderboard
  9. Honor & Glory for the winner (and maybe some prize money)

Bot loses track of DynVC when owner leaves directly after creating the channel

Describe the bug
Joining a channel with the key key_bot_new*voicechannel creates a new voice channel by the bot. Leaving immediately normally deletes the channel, but instead the bot loses track of opened channels. From the current log behaviour I am not perfectly sure if "instantly leaving" is the real cause.

To Reproduce
Steps to reproduce the behavior:

  1. Join key_bot_new*voicechannel
  2. Either leave VC immediately before DynVC is created, or leave after DynVC is created but before you are moved by the bot, or leave after full DynVC creation cycle is finished, or change to an already existing DynVC before cycle is finished

Expected behavior
The newly created DynVC should be deleted by the bot, including the text channel and the server role designated to it

Actual behavior
The bot fails deleting the whole DynVC packet. It loses track of currently opened channels due to a possible rupture in the vc-bufferdict, causing 3 more sideeffects:

  1. All currently opened DynVCs are immediately untracked
  2. All currently opened or closing DynVCs cannot be deleted by the bot, making them orphaned
  3. All DynVCs created after this bug can not be set into the tracker, therefore all DynVC in existance are untrackable until the bot fully restarts

This bug forces a cold restart to get the bot in an operating state. This causes even more data loss and is not acceptable.

$help does not actually show help of external commands

Describe the bug
When calling $help command, the help request always resolves to "False" and spits out following note: "This command has no function to print help.", even when the requested command fully implements the coroutine get_help. This results in _do_specific_help to always fail.

To Reproduce
Steps to reproduce the behavior:

  1. Run Command '$help chall' (Only command to implement the specific help as external command)

Expected behavior
The actual help of the requested command should be printed

Actual behavior
"This command has no function to print help." is printed

Used bot version and device information:

New command: 'poll'

Is your feature request related to a problem? Please describe.
When creating a poll manually, often the answers are badly formatted plus the author needs to append the reaction emotes himself. This could be automated via the bot

Describe the solution you'd like
A new command 'poll' with following syntax:
poll <question> <[emote] <option>> ..., with <required> and [optional].
At least two options should be provided.
Option text can and should take advantage of multi-word-arguments using quotation marks.
When no emote is specified for an answer, use emotes :REGIONAL_INDICATOR_A:, :REGIONAL_INDICATOR_B:, ...
Obviously, when a custom emote is specified for an answer, the bot must check if it can use this emote. If not, fallback to regional indicator emojis. In this case, also note that not only the appended reaction should fallback, but also the emote used within the "option" text inside the embed that is generated by the bot.

Describe alternatives you've considered
Add another bot to the server that can handle polls, but this is dirty tactics: Server should stay clean with as few bots as possible.

Additional context
Add any other context or screenshots about the feature request here.

DynVC: auto-transfer of ownership doesn't work

Describe the bug
Dynamic voice channel: When the owner disconnects, the bot doesn't promote a new member to owner.

To Reproduce
Steps to reproduce the behavior:

  1. Create a new voice channel (public or private)
  2. Let at least one more user join the channel
  3. As owner, without transferring ownership, leave the channel

Expected behavior
The bot transfers the channel ownership to another connected user.

Actual behavior
The channel ownership stays at the originial channel owner who is not connected anymore. No one can now control the channel until the original owner reconnects. Only automatic channel close works, when everyone leaves the channel. No more invites, kicks, closings or edits possible.

Used bot version and device information:

Bot loses tracking of dynamic voice channels on disconnect or restart

Describe the bug
When the bot is not connected (because of an updating process, restart or disconnect) to the server, but a dynamic voice event takes place, the bot loses all tracking information about the dynamic channels. Furthermore: When the bot process terminates (because of an updating process or restart), the bot stops tracking the channels and instead closes any open dynamic voice channel and its dedicated text channel.

To Reproduce
Steps to reproduce the behavior:

  1. Create a dynamic voice channel by connecting to the corresponding "new private/public voice" channel
  2. Stop the bot by running stop in an administrator channel as a user with administration rights
  3. Start the bot again

Expected behavior
The bot should regain tracking information

Actual behavior
The bot behaves as if there were no open dynamic voice channels. Its corresponding voice channel, text channel and server role are now orphans and need to be removed manually by an server administrator.
(The bot closing all open dynamic channels on process termination is intended behaviour as of minimizing workload on bot update process. But it is definitely not expected behaviour for users as they get kicked on every update. This circumstance outlaws an update process while any member is connected to a voice channel)

Used bot version and device information:

Additional context
Add any other context about the problem here.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.