Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

InstallationHow to Use


Installation

Prerequisite
  • To use this bot, Node.js 12.0.0 or newer must be installed.
Downloading and installing steps
  1. Download the zip file.

  2. Configure the Bot:

    • Run npm i
    • You will need to create a bot application in the developers space
    • Replace the placeholders in config.json with your preferred settings and your token (there are already example values in there, but the token and chnanel ID are invalid, so make sure to change it).
  3. Invite the Bot to your Server:

    • In your bot's application page, navigate to OAUTH2

    • In the "scopes" section, select bot

    • In the "bot permission" section, select:

      • ADMINISTRATOR
    • Copy and paste the generated invite link!

  4. Get the Bot Online

    • Run node index.js
    • The bot is now operational ! 🎉


How to Use

Whenever somebody chats in the channel specified in config.json, the channel will be locked until there is no activity spotted for the amount of time specified in config.json (I've currently set it to five minutes, but you can change it if needed).


The channel will be unlocked until the next person chats in it, and the cycle repeats. You can also see the status of the channel from the channel name at any given time. If it is unlocked, it will show a 🔓. Otherwise, it will show 🔒.


Note: Make sure the default permissions for the specified channel are as shown:

  1. @everyone
    • READ_MESSAGES: true
    • SEND_MESSAGES: true
  2. Bot user or role
    • READ_MESSAGES: true

About

Created for kxatniss

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages