arch-community / qbot Goto Github PK
View Code? Open in Web Editor NEWa general purpose utility Discord bot, originally created for the Arch Linux community
Home Page: https://discord.gg/yfvZ73DDUb
License: GNU Affero General Public License v3.0
a general purpose utility Discord bot, originally created for the Arch Linux community
Home Page: https://discord.gg/yfvZ73DDUb
License: GNU Affero General Public License v3.0
This is a feature request from observing phrik (#archlinux IRC bot). To demonstrate what the feature requests meant, please refer to the following below,
<Sophon> !give rain AUR
<phrik> rain, https://wiki.archlinux.org/index.php/Arch_User_Repository
Support for Discord slash commands. Blocked on shardlab/discordrb#13.
Queries can be too long or contain invalid characters that make .oq return Bad Request errors internally
No check for long prefixes with config prefix set
which can overflow the field title of help
Steps to reproduce:
.bl
).Expected result:
Qbot
deletes the message.
Actual result:
Nothing happens, on the user side.
Rolegroups have the following attributes:
Roles can be added to a rolegroup (stored as a GroupedRole)
Color roles are also exposed as a rolegroup
Users can get a role from the group if it has selfroles enabled
Create quick reaction message from a rolegroup
snippet add
snippet edit
blacklist add
can all be run successfully with missing options or arguments and cause issues
Explanation and cause:
This is because qbot
sends the direct message to the user before deleting the message (here on line 44 of the blacklist
module), if the user blocks qbot
, it will cause an exception preventing the deletion of the message.
Steps to reproduce:
qbot
on discordExpected result:
qbot
deletes the message
Actual result:
Nothing happens (presumably, qbot
raises an exception)
Proposed fix:
Have qbot
delete the message prior to sending the direct message
I was using Qbot to generate some colors and I wanted some new ones so I ran .ccr
after already generating some color roles, and the bot sent
Deleting existing color role
color31 [c]
.
Deleting existing color rolecolor31 [c]
.
then stopped, so I ran it again and the bot sent
Deleting existing color role
color30 [c]
.
Deleting existing color rolecolor30 [c]
.
and stopped again.
When entering abnormally long strings into figlet
(tested with a string of 1992 W
s), under unknown circumstances the bot will shut down
This will also generate large walls of spam
So far, I have found two causes for this:
find_prefix
in lib/helpers.rb fails since event.server
is nil
and therefore doesn't have an id
attributecan_run
in lib/patches.rb fails due to the same reason.This is a feature request after observing phrik (#archlinux IRC bot) having the ability to do this. To clearly demonstrate what I meant, please refer to the following below:
<rain> !bail
<phrik> rain has called it quits. Good luck!
It still points to the old pre-organisation link (https://github.com/anna328p/qbot) instead of pointing to the new link (https://github.com/arch-community/qbot).
This is also present in the qbot instance hosted by the owner
The if statement on line 41 will always evaluate to true
and the logic on line 44 appears to be backwards.
Ability for blacklist entries to apply to servers or channels. Would require a new scope column in the blacklist entry table.
Jobs using Active Job with Delayed Job backend
Schedule jobs with a delay (they execute at a certain time roughly, useful for timed role assignments) or regularly (clear out old oneshot triggers or queries)
Instead of saying that the translation wasn't found for a text if it's missing from the locale, I think it would be better if it fell back to the en
locale for that piece of text because it's better than nothing
So we can have reactions that more fit the options
No help description in tp
or en
for figlet
command
It would be nice to have a way to fetch AUR packages, like pacbot does, so you do .q aur <package name>
like. of course this is a demo command and can be changed anytime by the Dev.
Like .aw
command for searching through Arch Linux wiki, a feature request to have a similar feature but instead search Arch Linux man.
Reaction roles will use this system internally.
After option 9, emoji will show as first digit of option number only
No check for snippet name help
, which causes snippet properties to not be able to be edited by config snippet prop
due to there being a help text
A script which checks a locale against en
for missing or extra translations to make maintaining locales a little easier
No check for empty snippet content or name with config snippet add
and config snippet edit
https://github.com/arch-community/qbot/blob/main/modules/fun.rb#L10
Because of contributing guidelines, the string I got pinged :o
should come from the t
function for localization
Some keyboards like to do this symbol instead of ...
.
After looking in the code this may be a bit harder to implement
command :note, {
aliases: %i[n ..],
The aliases part relies on there already being a period at the beginning, but since this is a unicode character this is not the case. The only way it seems would be to rewrite the aliases bit to not always expect there to be a period at the beginning, which would also mean rewriting many commands.
I have no idea how the command system works internally and I cannot find much information about it, however it is possible that it is baked into discordrb which would be a bit more annoying.
Closest I could find is this, however as I do not know ruby I am unsure.
ⓘ Jump to line
# A command that references another command
class CommandAlias
# @return [Symbol] the name of this alias
attr_reader :name
# @return [Command] the command this alias points to
attr_reader :aliased_command
def initialize(name, aliased_command)
@name = name
@aliased_command = aliased_command
end
end
I cannot help with actually developing this much as ruby does not want to work for me, however I can still write (some) code.
So we can have things like polls where you can only select one option and stuff
This happens due to the same reason as #102 (event.server
is nil
).
Aliases for snippets so we can make them named shorter
On commands like poll
, user input can be long and cause an error due to exceeding embed character limits
config snippet prop help
doesn't include snippet name as argument in usage
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.