GithubHelp home page GithubHelp logo

announcebot's Introduction

These commands can only be used in the #mods channel.

+announce {role you want to ping} message

The most basic command the reason that the bot was created initially. The bot will make the announcement for you and ping any role that you want which helps keep you anonymous or just ping the group of people easily. Keep in mind that there MUST be a SPACE after the role name. A return will cause an error. Thanks Disco.

Roles that can be pinged using announceBot

android - Android Alpha

bug - Bug Hunter

canary - Canary

ios - iOS TestFlight

linux - Linux

mac - Mac

windows - Windows

+update {channel ID} {message ID} new message

The bot can edit any of it's previous messages with this command. By nature of how the API works, you need to tell it what channel to look in, and what message to change via IDs. So the command is +update channelID messageID new message. Here are list of the IDs for the announcement channels, for reference.

Global Announcements: 197038477953597440

Bug Hunter: 421790860057903104

Android: 411645018105970699

Desktop: 411645098946985984

iOS: 411645199866003471

+evilping

Standard ping command

+multiping -r {<name of any of the roles to ping}" -a "{announcement}"

Can only be used with the desktop roles: Linux, Mac, Canary and Windows. Will only post to #desktop-announcements. Allows for pinging any number of desktop roles and make the same announcement. Due to a bug within disco.py, you cannot use single or double quotes when using this command. Sorry.

The bot will automatically post in the correct channel based on the role you want to ping.

+Lockdown

The lockdown command can be used by any mod+ in any channel. It is ONLY to be used during an emergency. It will lock any combination of reporting channels + approval queue, or all of them. This is the command for it: +lockdown -c "channel_names_as_defined_below" -r "reason_that_this_command_is_being_used"

Note that you cannot use ' or " in the quoted sections due to how disco.py works.

The short name for all of the channels are:

bug

ios

android

desktop

linux

in addition, instead of each channel you can say all instead. For example: +lockdown -c "all" -r "Trello is down" and that will lock all of the above channels.

The "reason" category will be the EXACT message that appears in all of the channels that are locked down

+Unlock

The "undo" command for Lockdown. Syntax is +unlock {channel_name} to unlock one channel, or +unlock all to unlock all of them.

+slowmode

In case there is a lot of people sending messages after an update has released or there is ongoing outages. You can set slowmode between 1-120 seconds. Command usage: +slowmode CHNANEL_ID_OR_MENTION AMOUNT_OF_SECONDS

An example on how you disable slowmode:

+slowmode #android-client-chat 0

+Verification

In the event of a raid ONLY, any mod+ can use +verification LEVEL_NAME CHANGE_REASON.

Note that the level names are:

None

Low

Medium

High

Extreme

The CHANGE_REASON is optional for speed.

+ping

Unlike a standard ping command, this one makes any role in the server mentionable if you're an employee. It's useful for when you want to make an announcement without using the announce feature the bot has. You can use this same command to make a role unmentionable as well. As a QOL improvement to this feature, when the bot detects that a role has been pinged it'll automatically set it to be unmentionable automatically.

+addtag {tag_key} {tag_content}

The tag_key is the name of the tag as you'll be calling it later. Make it something easy to remember like "hypesquad" or "common_questions" or anything you want. Just one single word. The tag_content is the text that you want displayed to other users. For example:

+addtag Dabbit He is the best :dabHeart:

Would add the tag "Dabbit" to the .txt. When you use the follow up command +tag {tag_key}, in this case +tag Dabbit, the bot will respond with the text: "He is the best :dabHeart:".

The bot will take links and markdown just fine. It does NOT take new lines as returns. You have to keep everything on a single line and use \n instead of a return when adding the tag_content.

+taglist

Shows the tag_key for all available tags.

+removetag {Tag_Key}

Iterates through the tags.txt file to find the specified key:value pair and remove it.

+addfaq -f "{phrase_to_respond_to}" -c "{content}"

The bot has an auto response feature for commonly asked questions which are referred to as "FAQs". It reads each message and looks for the specific phrase added in the faqs.txt file and then responds with the corresponding value. For example, if someone shows up and says "How do I report a bug in this server?" the bot will respond with a preset message for the phrase how do i report a bug. This command will add another phrase to the faqs.txt file. Example usage:

+faqadd -f "how do i report a bug" -c "Just read the write up in #report-a-bug for information on how to report a bug!"

Note that due to a bug in the disco.py library you CANNOT use single or double quotes at any point in this or it will fail. Use \n for a new line. It will only respond to people lower on the role heirarchy than Bug Hunter.

+faq {phrase_to_respond_to}

This command is mainly to check the formatting of an already existing FAQ by manually triggering the response. Example usage:

+faq how do i report a bug

+faqlist

Generates a list of all FAQs phrases currently in the faqs.txt file. Does not show the content of the FAQs. This currently does not support pagination and when the message it returns gets over 2000 character limit it'll just fail.

+removefaq {phrase_to_respond_to}

As a management feature you can dynamically remove an FAQ from the list. This permanently deletes it with no recovery. Example usage:

+removefaq how do i report a bug

+editfaq -f "{phrase_to_respond_to}" -c "{new_content}"

A quality of life feature, allows you to rewrite the content of an FAQ without first removing it. You cannot edit the phrase_to_respond_to. Example usage:

+editfaq -f "how do i respond to a bug" -c "Just checkout out #report-a-bug!"

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

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"

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.

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

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

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.

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.

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.