Giter Club home page Giter Club logo

announcebot's People

Contributors

aenterprise avatar brxxn avatar dejaydev avatar icypebbles avatar jaredrneal avatar johnythecarrot avatar kitty-therapist avatar mouse91 avatar mrkirby153 avatar nihaals avatar rage0001 avatar samem avatar supersajuuk avatar webhp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

announcebot's Issues

Attempting to Edit destination sliently fails.

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.

Make XP-related command daily limits reset after a time

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.

Some issues I noticed in the code...

Hi Dabbit

So I looked through the code, and noticed several errors:

  1. 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.

  2. 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.

  3. In your commands, you print an error to console when an error occurs eg:

    print("The command was not run in the proper channel")
    Printing an error to console is pointless because it will never be seen by anyone. If it's the wrong channel, it's better to either: do nothing, or respond saying "this is the wrong channel to run that command". In this case, doing nothing (ie silent response) is preferable.

  4. When formatting strings, don't do this:

    message_to_announce = "<@&" + Role_as_a_string + "> " + args.announcement

    Instead, you should use more safer (and cleaner methods). In Python 3, you can use .format() with {} brackets for the substitution. I'm not sure about Python 2 formatting, but you should be able to do something like this:
    my_variable = "%s %s" % (previous_var1, previous_var2)

Alongside that, this is wasted characters:

message_with_multiple_pings = message_with_multiple_pings + "<@&" + Role_as_a_string + "> "

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.

A bug in server

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

Oldest report text shows when there is no oldest report

Steps to reproduce:

  • Have a category with no bug reports in #Bug-Approval-Queue
  • go to #Queue-Summary
  • View the line "This is the Oldest Report"
    Expected result:
    It should say "There is no reports" or "There is no Oldest Report"

+getxp no longer works

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.

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.