Giter Site home page Giter Site logo

frankwhoee / victorbot Goto Github PK

View Code? Open in Web Editor NEW
0.0 3.0 2.0 37.28 MB

Multi-purpose Discord bot that can manage voice channel movement and also acts as a soundboard.

Python 99.52% Dockerfile 0.48%
discord discord-bot discord-py multifunctional python hacktoberfest

victorbot's People

Watchers

 avatar  avatar  avatar

Forkers

kolcrooks doraqi

victorbot's Issues

Emoji usage analysis

Command Usage:
usage

Command Result:
Reads message history to see which emoji is most useful based on emoji sends and reactions.

Skill

Delete code and add boilerplate.

Issue to be referenced for misc. framework changes brought in along with other issues.

Add status command

Command Usage:
Describe how the command should be used.
status

Command Result:
Creates an embed with relevant information to indicate status.

Add sound board

Have a folder of sound files that can be played from attached commands.

Attached commands:
play SOUNDFUZZYOPT, plays the sound file with a name closest to SOUNDFUZZYOPT. If parameter is left out, a random sound is played.
stop, stops sound
volume NUMBEROPT, sets volume to NUMBEROPT, if left out reports volume instead.

Add message command

Command Usage:
Describe how the command should be used.
message GUILDFUZZY CHANNELFUZZY STRING

Command Result:
Sends STRING to CHANNELFUZZY in GUILDFUZZY.

Add message tagging

Add message tagging so that you can save categories of messages
!tag
!tag MESSAGE_ID

join doesn't work

Traceback (most recent call last):
File "/home/pi/victorbot/main.py", line 179, in handle_command
modifiesData = await func(message, client, data, command)
File "/home/pi/victorbot/commands/join.py", line 12, in main
if client.voice_clients.get(message.guild.id) is not None:
AttributeError: 'list' object has no attribute 'get'

Add ngrok command

Command Usage:
ngrok
ssh

Command Result:
If ngrok is unavailable, download it and ask for ngrok authtoken. Otherwise, create an ngrok tcp tunnel to local machine and send back URL.

Add expiry to grants

Grants expire after a set time. Time can be changed using a command:
grant expiry TIMEINTOPT, if TIMEINTOPT is left out, expiry time is reported.

victorbot is incompatible with RPI3

Remove discord.py submodule for discord.py 1.7.3, so that victorbot can run on Python 3.7. This allows victorbot to be run on Buster, and we can then install tensorflow onto buster.

Random soundboard triggers

Attached commands:
enablerandom EN/DISABLE, enables this feature or disables it based on EN/DISABLE.

Joins a voice channel plays a sound randomly then leaves. A timer is set to a random duration to trigger this action again.

Add keyword command

Command Usage:
keyword KEYWORD SOUNDFUZZYOPT MESSAGEOPT

Command Result:
Associates KEYWORD to SOUNDFUZZYOPT or MESSAGEOPT. After command is run, if KEYWORD is found, SOUNDFUZZYOPT will play in the voice channel with most people from this text channel and/or send MESSAGEOPT into this text channel. One or both of SOUNDFUZZYOPT and MESSAGEOPT is required.

pingon

Command Usage:
Describe how the command should be used.
pingon USERSTRINGFUZZY MESSAGEIDOPT

Command Result:
Pings the user the next time they're online, with a reference to the replied message or the message with ID MESSAGEIDOPT.

Probably requires extra infrastructure in the form of event handling for when user status changes.

Add merge voice channel command

Usage:
merge @FROMUSER @TARGETUSER
merge FROMCHANNEL TARGETCHANNEL
merge all TARGETOPT

Takes all the users from FROM* voice channel to TARGET* voice channel.
merge all will merge everyone to TARGETOPT. First channel if TARGETOPT is not specified.

Add game based voice channel moving

Command Usage:
Describe how the command should be used.
game VOICECHANNELFUZZYOPT

Command Result:
Moves everyone playing the same game in the current voice channel to VOICECHANNELFUZZYOPT. If VOICECHANNELFUZZYOPT is empty, moves to the next empty voice channel.

Create a data.json updater

Since forcing everything that uses a particular key in data.json to check if the key exists and to create it if it doesn't is a lot of repeated code that we need to copy around everytime we change or add a key, command must be able to assume that some keys exist already. This can be achieved by creating a key for each guild with default values built in already when we handle commands from new servers, but another problem arises when we update our keys in a new version of victorbot and update a running version of victorbot—data.json will not have the added or changed key, and so commands will break.

We need a script that upgrades data.json to newer versions. This will make victorbot more backwards-compatible.

Add poke2 hint solver

Using a list of pokemon names, solve poke2 hints by finding possible names that could fit. Probably store the pokemon names in a text file or something.

tag, find for easy message saving

Command Usage:
Without args, refers to replied message or first message above in that priority
tag TAGSTR
tag MESSAGEID TAGSTR

find TAGSTR

Command Result:
Stores message properties with tag so it's easily searchable. Find command gets a list of messages with tags matching TAGSTR.

Add pull command

Command Usage:
Describe how the command should be used.
pull

Command Result:
Calls git pull and sends back a status message in the text channel.

Add grants for voice channel

Command Usage:
Describe how the command should be used.
grant @USERTAGOPT USERFUZZYOPT VOICECHANNELFUZZY

Command Result:
If the user is already in a voice channel in this server, they will be moved to VOICECHANNELFUZZY, if they are not yet in a voice channel they will be moved to VOICECHANNELFUZZY on joining a voice channel.

One of @USERTAGOPT and USERFUZZYOPT is required. *FUZZY means a fuzzy search will be applied to find these users and voice channels.

Add server social credit

Tracks the "social credit" of members in a server. Sends the leaderboard every week to report everyone's social credit.

Have a text file of bad words and a text file of good words, bad.txt and good.txt

Attached commands:
good WORD, appends WORD to good.txt
bad WORD appends WORD to bad.txt
goodscaling NUMBER, scales good word impacts by NUMBER
badscaling NUMBER, scales bad word impacts by NUMBER.
leaderboard, shows social credit leaderboard
leadboardchannel DISABLE, associates channel with weekly leaderboard posting. If with parameter, then leaderboard posting is removed.

Case 1:
Message sent without a word in either bad.txt or good.txt.
Server social credit is unaffected.

Case 2:
Message sent with word included in bad.txt with negative sentiment.
Social credit is improved.

Case 3:
Message sent with word included in bad.txt with positive sentiment.
Social credit is decreased.

Case 4:
Message sent with word included in good.txt with negative sentiment.
Social credit is decreased.

Case 5:
Message sent with word included in good.txt with positive sentiment.
Social credit is improved.

Social credit impact is calculated by SENTIMENT * SCALING

Add main process check

Add if __name__ == "__main__": to runnable code in main so you can import main.py globals.

Social Credit data collection

Reacts with messages flagged by good.txt or bad.txt and reports the social credit impact (positive/negative) with an emoji, then asks whether this judgment was correct (also through emoji) to collect data on prediction performance and also maybe to collect enough data to train a model.

Add request command

Command Usage:
Describe how the command should be used.
request VOICECHANNELFUZZY
approval @ROLE
Command Result:
Sends a request to join a voice channel, and approved by people with sufficient permission. Role sufficiency determined by @ROLE.

Add paging to find

Add paging to find so you can only see 10 at once, and select which one to see more in detail, using emojis.

!visible

Command Usage:
visible GUILD CHANNEL, for out of guild usage
visible CHANNEL, for in guild usage

Command Result:
Shows stats about the last 10 messages in CHANNEL, whether theres images, how long text is.

Import error on WrongChannelTypeError

Traceback (most recent call last):
File "/home/pi/victorbot/venv/lib/python3.9/site-packages/discord/client.py", line 456, in _run_event
await coro(*args, **kwargs)
File "/home/pi/victorbot/main.py", line 128, in on_message
module = importlib.import_module(f"commands.{command['command']}")
File "/usr/lib/python3.9/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1030, in _gcd_import
File "", line 1007, in _find_and_load
File "", line 986, in _find_and_load_unlocked
File "", line 680, in _load_unlocked
File "", line 790, in exec_module
File "", line 228, in _call_with_frames_removed
File "/home/pi/victorbot/commands/join.py", line 2, in
from util.decorators import guildCommand
File "/home/pi/victorbot/util/decorators.py", line 1, in
from errors import WrongChannelTypeError
ModuleNotFoundError: No module named 'errors'

Add prefix command

Command Usage:
prefix CHAR

Command Result:
Sets the global prefix to CHAR.

Add blackhole command.

Command Usage:
She's gone from suck to blow.
blackhole @ROLEOPT GAMEFUZZYOPT DURATIONOPT VOICECHANNELFUZZY
blackhole
Command Result:
Pulls everyone in that is @ROLEOPT and GAMEFUZZYOPT into VOICECHANNELFUZZY for DURATION minutes. One or both of @ROLEOPT and GAMEFUZZYOPT is required. If DURATION is left out, defaults to 10 minutes.

If blackhole is run with no parameters, it puts everyone into the middle voice channel then distributes them inversely normally across all voice channels after a short duration.

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.