frankwhoee / victorbot Goto Github PK
View Code? Open in Web Editor NEWMulti-purpose Discord bot that can manage voice channel movement and also acts as a soundboard.
Multi-purpose Discord bot that can manage voice channel movement and also acts as a soundboard.
Command Usage:
usage
Command Result:
Reads message history to see which emoji is most useful based on emoji sends and reactions.
Delete code and add boilerplate.
Issue to be referenced for misc. framework changes brought in along with other issues.
Command Usage:
Describe how the command should be used.
status
Command Result:
Creates an embed with relevant information to indicate status.
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.
Title
Scrape vlr.gg for match data:
Commands:
vct
, returns current or upcoming vct matches going on.
Command Usage:
Describe how the command should be used.
message GUILDFUZZY CHANNELFUZZY STRING
Command Result:
Sends STRING to CHANNELFUZZY in GUILDFUZZY.
Installation fails because jellyfish is not in requirements.txt
Add message tagging so that you can save categories of messages
!tag
!tag MESSAGE_ID
Title
Command Usage:
subscribe
Command Result:
Subscribes current channel to a status update at boot.
Should be "they join" not "then join"
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'
message should only include text channels
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.
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.
!tag MESSAGEID multiple words
will yield in tagging the next message up as 'MESSAGEID multiple words'
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.
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.
Specification in #4 says that mentions are allowed as input but this command currently does not support it.
Gives a list of links to messages that triggered a threshold on visible 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.
Write a template command to base others off of.
Should guild data be preserved?
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.
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.
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.
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.
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.
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.
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.
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.
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 if __name__ == "__main__":
to runnable code in main so you can import main.py globals.
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.
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.
Soundboard can be triggered by voice. Plays sounds based on what people say.
Add paging to find so you can only see 10 at once, and select which one to see more in detail, using emojis.
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.
Only catching logging in as Bot.
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'
Command Usage:
prefix CHAR
Command Result:
Sets the global prefix to CHAR.
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.
Uses string gid to check and not integer so matching goes wrong. line 54 of main.py.
Seperate out tagged messages and tags as a seperate table for easier data retrieval.
Adding typing indicator for gant and visible
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.