Skip to content
Silari edited this page Sep 4, 2024 · 20 revisions

Welcome to the DBContext wiki!

This page covers the usage of bots based on dbcontext, particularly the instance running as the PicartoWatch bot. Much of the following would apply to any instance of dbcontext, but their invite link and user name would of course differ.

Inviting to Your Server

The bot can be invited to a server using the invite link. This is the standard Discord method of inviting bots to a server. It can only be done for a server to which you have the Manage Server privilege.

It is recommended you not remove permissions from the default, as the invite is set to give only the minimum permissions it needs in order to function, though missing permissions will only affect those functions which directly require them. The permissions it requires are:

  • Read Messages; Send Messages; View message history; Embed Links: Needed for announcement message functionality. If any of these are missing, announcements may not send, may not display properly, and/or editing may fail. Obviously, the bot must be able to send messages in a channel to make announcements there. It is not required the bot has Read Messages in any channel other than where it makes announcements. View Message History is required to allow the bot to find old announcement messages if it doesn't have them cached, like from a restart. Only the 'simple' message type doesn't use the Embed Links permission. These should ALWAYS be present, as they are essential to the bot's basic functionality, and are all permissions users normally have.
  • Manage Roles: Used by the Manage module for creating/assigning the roles used by both the Notify system (StreamNotify) and the role used to give users permission to command the bot (StreamManage). If the permission is missing, the bot will not be able to create the needed roles if they are missing, and won't be able to assign/remove the roles when prompted to. In addition, both those roles must be lower in the role hierarchy than the bots highest role - the bot will attempt to warn the user if this is not the case.
  • Mention @everyone, @here, and All Roles; Add Reactions; Manage Messages: These three permissions are used by the Notify system. The first allows it to mention the StreamNotify role, which isn't set as mentionable to avoid abuse by users. The second allows it to add the needed reactions to the message that users use to signify they want to be notified of new streams. The last is used solely to pin the message that users react to, so it can be easily found. While the Notify system will work without the last two permissions, it would make it more difficult for users to find the message and add the proper reaction if they are missing.
  • Use external emojis: Used in a potential future update to the notification system. Will not currently cause any issues if missing, but may break the system in the future if the feature does get implemented (basically using a custom emote for it, rather than 🔉 : sound :, which could be on any message rather than a specific one).

Basic Example of usage

Once the bot is in the server, you can set it to watch a stream with just 2 commands. The following example uses the twitch module, but piczel and picarto work the same. In the channel you want to use for your announcements, say the following commands:

@PicartoWatch twitch channel

@PicartoWatch twitch add PatStaresAt

The channel command tells it what channel to put announcements in, and the add command tells it to add a new stream to announce. Once the stream comes online, the bot will send a message announcing it. The other pages on this wiki give more details on the available commands and options.

Notes on Documentation

Where a command asks for a <ChannelMention>, it means using the #channelname format such that it creates a clickable channel mention.

Where a command asks for a <user>, it means to specify a user using any of the following formats: A valid @Username mention, a username and discriminator combo in username#0000 format, or a discord user id snowflake (which are typically only viewable in developer mode).