Skip to content

Discord dota2bot checks OpenDota API for new recent matches of USERS every 'n' minutes. When new recent match is found, dota2bot posts a game summary as a message in a specified Discord channel.

Notifications You must be signed in to change notification settings

timleungtech/discord-dota2bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Summary

Discord dota2bot checks OpenDota API for new recent matches of USERS every 'n' minutes. When new recent match is found, dota2bot posts a game summary as a message in a specified Discord channel.

Installation

  1. npm install
  2. create bot in discord developer portal
  3. grab app token and add to config/config.env
  4. enable dev mode on discord to enable copy channel_id for interactions
  5. add channel_id to config/config.env
  6. create mongodb db, grab URI, and add to config/config.env
  7. node index.js

Commands

  • $list
  • $track <ref_name>
  • $untrack <ref_name>
  • $insert <ref_name> <account_id>

Database models

/dota2bot database
└── servers
    └── document
        ├── server_id : 'server_id'
        ├── channel_id : 'channel_id'
        └── players_tracking : []
└── players
    └── document
        ├── account_id : account_id
        ├── name : 'name'
        ├── match_id : match_id
        └── servers : []
└── heroes
    └── document
        ├── hero_id : hero_id
        └── localized_name : 'localized_name'

Room for improvement

  • disallow commands affecting other servers with dota2bot
  • fix scope to separate access of players between multiple servers

preview

About

Discord dota2bot checks OpenDota API for new recent matches of USERS every 'n' minutes. When new recent match is found, dota2bot posts a game summary as a message in a specified Discord channel.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published