Giter Site home page Giter Site logo

liasis's Introduction

This Discord bot automatically updates a data.json file with a member id, date, and status whenever it sees a change in that member's status.

Commands include:

  • !hello or !ping - Use to check if bot is recieving commands properly. Should return "Hello!".
  • !update or !refresh - The bot will update its log with all members with a status not set to offline.
  • !lastseen or !ls - The bot will reply with the difference between the current datetime and the last logged datetime for the member(s) mentioned in the command. E.g. !ls @Dysrhythmic @Ascii will return how long ago it has been since the bot has logged both users.
  • !status - Replies with the last status the bot logged for the given user(s).
  • !printlog or !pl - Replies with a list of members that have been logged. E.g. if @Dysrhythmic is the only logged member then !pl will have the bot reply with Dysrhythmic#9317.

Setup:

  • Go to the Discord developer portal, create a new application, name it, go to the bot tab, and add bot.
  • You get your bot's token from the bot tab, which you will need for logging in your bot. Don't share the token with others.
  • Your bot token should be stored in a .env file as BOT_TOKEN=YOUR_TOKEN_HERE.
  • Since this bot tracks presence data of server members you will also need to enable "Presence Intent" and "Server Members Intent" settings in the bot tab.
  • Set whatever permissions you want the bot to have in the "Bot Permissions" section (e.g. view channels, send messages, etc.).
  • Go to the OAuth2 tab and check the box next to "bot" in the "Scopes" section.
  • Copy the URL generated at the bottom of the "Scopes" section. Go to the URL in a new tab or window.
  • This will take you to a page where you log into your Discord account and choose which of your servers you want the bot to be added to.
  • Authorize the bot and it will join the server in offline mode. It will not be online until you run the Python file.
  • The Discord API can be found here, and it's extension can be found here.

liasis's People

Contributors

dysrhythmic avatar

Watchers

 avatar

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.