jaredrneal / announcebot Goto Github PK
View Code? Open in Web Editor NEWbot to make announcements in DTesters
bot to make announcements in DTesters
When you attempt to edit the destination by using the bot, the bot doesn't do anything but will instead delete the message after a few seconds. This happens if you are an original reporter of the submission, but the bot will send a message if you try to edit someone else's.
In the current system, it's possible that the user won't get XP because of the time gap confusion:
For example: if I approve 3 bugs on 8 AM then 2 bugs at 12 PM, then followed by tomorrow I approve 4 bugs on 10 AM, the 4th one will not register, and I need to wait until 12 PM to get XP from last two commands.
Then on the next day, I can get XP from 5 reports at 1 PM but then I can't get XP on the morning the day after because I've done the approve command yesterday afternoon. A few days after then I'll lose track on yesterday's command input time, especially if the input time for each command input is quite large (1 hour or more).
Solution: make a daily time reset based on a set time (for example the limit reset after 12 AM).
I hope you understand what I say. Thank you.
Hi Dabbit
So I looked through the code, and noticed several errors:
Your permissions check for whether the user has the ability to use !announce is too late. Permissions checks must be the first thing in the command function, so as to avoid unnecessary code checks being made when the user is unable to actually utilise the command. Generally, a permissions check should return a boolean response of True or False.
In addition to the above, users with no permission should get no response from the bot, not a response telling them the command exists and that they have no perm. Silent responses mean that the user is not aware of the bot commands and won't be able to attempt to use them.
In your commands, you print an error to console when an error occurs eg:
announceBot/commands/announce.py
Line 36 in 39a71c8
When formatting strings, don't do this:
announceBot/commands/announce.py
Line 114 in 39a71c8
my_variable = "%s %s" % (previous_var1, previous_var2)
Alongside that, this is wasted characters:
announceBot/commands/announce.py
Line 119 in 39a71c8
You can achieve the exact same result by doing: message_with_multiple_pings += "<@&" + Role_as_a_string + "> "
Couldn't see anything else of concern, but I'll post them later if I see them.
Well, once I got DMed by the bot as I joined the server in Discord Testers. I was smart enough to read all the rules and links the bot sent cuz my other acc got banned for I went against the rule and I didn't read it. I don't miss it now:P
So I was just reading them and going by the links the bot sent and then I found a channel that is not connected. If you read line number 7. You will see it the first thing that will say #deleted-channel. The link is given below. Thanks, and enjoy!
Link: https://discordapp.com/channels/197038439483310086/197038477953597440/430398432260259843
Steps to reproduce:
In DMs, the bot shouldn't try to delete the command or the reply since it wouldn't make a public channel messy.
Recently, when the update was pulled in. Sajuuk ended up asking about if I could get the XP for him, and since I was generous enough to check to see how much XP he had. So I did +getxp ID
but discovered that there was no errors.
The bot just stopped responding completely to the said command, and there has been no errors in the console as well. Filing this for Dabbit as he requested this.
Steps to reproduce:
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.