Skip to content
This repository has been archived by the owner on May 22, 2019. It is now read-only.

Keyword Notifier User Following Info and Setup

appu1232 edited this page May 15, 2017 · 2 revisions

Keyword Notifier

The Keyword notifier can be used to log and get notified when someone says a keyword or words in one of your servers (works for mentions as well). Here is another example of what it looks like when the bot finds a message with the specified keyword:

img

As you can see, it shows the context, the keyword it matched, time message was sent, server, channel, and the names of the users in the context.

  1. Setting up the notifier
  2. Proxy bot if you want direct message notifications
  3. Optional shorthand commands

Setting up the notifier

  1. Go to the server where you want to receive notifications. You probably want a private server just for yourself or one where you are admin and can create private channels.
  2. Do >log and ensure that the logger is on. Now set the log location for the logger (option 2). This is where the bot will post the found messages.
  3. Go to your Server Settings (it's here) and go to WebHooks near the bottom. Create a webhook.
  4. Give it whatever name and avatar you like and change the channel to the channel where you want to receive notifications. Copy the url and make sure you hit save. It should look something like this.
  5. Do >log again and select option 5 (keyword notifier) and then select either options 1 or 2 (option 3 requires a proxy bot, see below in the proxy bot section).
  6. Paste the url for the webhook when prompted to do so.
  7. Personalize your keyword logger/notifier by adding keywords, blacklisting, and more. Use the menu in >log to navigate and enter your settings easily.

That's it! You are good to go.

Things to note:

  • Only other people can trigger the log message. You yourself saying a keyword won't log the message.
  • The channel the keyword notifier is logging in (your >log location) is exempt from the keyword search.
  • Bots do not trigger the keyword notifier. Only user accounts can.
  • If the logged message + context is too long, the log message will be split up into multiple messages. These mutiple messages don't use embeds so it won't look as neat, sadly. This shouldn't happen often though.

Proxy bot if you want direct message notifications

  1. Create a Discord bot account and get the bot's token. Then add the bot to the server where you are logging. Follow these quick steps.
  2. Make sure to give the bot read, send, edit messages, and embed permissions in the channel you are keyword logging in.
  3. Do >log and select option 5 (keyword notifier) and then select direct messages. Enter the token when prompted. Make sure you grabbed the token not the client secret!

If all goes well, you should see your proxy bot on the sidebar come online.

Shorthand commands

Just some optional commands you can use to either change some settings not offered in the >log menu or want to quickly change without having to go through the menu.

  • View settings and turn on and off the keyword logging:

    • >log on - Turn on keyword logging. (should be on by default)
    • >log off - Turn off keyword logging.
    • >log context <number> - set how many messages before the logged message to show when logging a keyword. Default is four.
  • Set up which servers you want to get notified for or set it up for all servers. Set to all servers by default.

    • >log add - adds the server you are in to be checked for keywords.
    • >log remove - removes the server from keyword check.
    • >log toggle - toggle between just the servers you added or all servers. Default is set to all servers so you do not need to add every server.
  • Set how you want to receive notifications:

    • >notify msg - posts in the keyword notifier channel using the webhook. (default)
    • >notify ping - posts in the keyword notifier channel but also get pinged when it does so (helpful if you want to see your logs in the recent mentions tab).
    • >notify dm - recieve via direct message. This requires the proxy bot to be set up. See below
    • >notify off - don't recieve any notifications (keywords will still be logged if keyword logging is on but no notifications will be sent)

User Following

Note: You must set up the Keyword Notifier (steps 1-7 at the start of the section) in order to use this feature.

Set up people to follow and get notified when they post a message:

  • Use the >log command and select the User follow section in the menu to go about it the simple way. Otherwise, here are some shorthand (albeit maybe a bit more complicated) commands to set it up:

  • Enable developer mode in your user settings to copy user and server ids.

  • >log adduser <user_id> | <n> - get notified when this user sends a message across any of your servers. The <n> is the cooldown in minutes before that user posting will notify you again. See below for a more thorough explanation.

    • Ex: >log adduser 124910128582361092 | 10 - I will get notified when user with id 124910128582361092 posts a message anywhere with a cooldown of 10 minutes.
  • >log adduser <user_id> | <server_id> | <n> - get notified when this user sends a message in the given server. <n> is the same as above.

  • >log removeuser <user_id> and >log removeuser <user_id> | <server_id> - remove the user from all servers or that one server respectively.

  • >log refresh or >log refresh <user_id> - refresh the notifier for all users or this specific user if <user_id> is given. Basically allows you to get notified on the very next message from your users. Aka "I need to know where they are posting right now".

More important information about user following:

  • The cooldown is in minutes but you can go lower than 1, although I wouldn't advise it unless you want to get spam pinged.
  • The cooldown is basically a timer that counts down but resets if the user posts again within the count down. Basically, a user must go <n> time without posting and then the next post will trigger the notification.
  • adduser and removeuser are directly linked so you can't do something like add a user for all servers and then try to remove them from one server. If you add a user for all, you must remove for all. If you added for one server, you must remove for that server.
  • If you are using a channel to recieve notifications (no proxy bot) and want to recieve notifications in a different channel for user follows rather than the same one as the keyword logger, you can do this by setting a second log location >log location2 in this second channel. You will also need a second webhook so create a second webhook for this new channel using the same instructions as in the Keyword Notifier section and then do >webhook2 <webhook_url> and you should be all set.