All Projects → SchwaIndustries → ScrimBot

SchwaIndustries / ScrimBot

Licence: MIT license
Discord bot for organizing Valorant custom games.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to ScrimBot

gatekeeper
supercharge your discord commands by gatekeeping them in a flow of reactivity ⛓⚡
Stars: ✭ 52 (+67.74%)
Mutual labels:  discord-bot, discord-js
verification-bot
Simple Discord.js bot for verifying new members are not bots
Stars: ✭ 61 (+96.77%)
Mutual labels:  discord-bot, discord-js
yumeko
Just an ordinary bot, where you hard copy the source you will get sin (maybe).
Stars: ✭ 23 (-25.81%)
Mutual labels:  discord-bot, discord-js
suggestions-bot
A Discord bot designed to build better communities by encouraging a positive and constructive relationship between community and staff.
Stars: ✭ 22 (-29.03%)
Mutual labels:  discord-bot, discord-js
Discord-BOT-Dashboard
This version is outdated, please check out Discord BOT Dashboard v2
Stars: ✭ 32 (+3.23%)
Mutual labels:  discord-bot, discord-js
pickle-mod
Discord bot for server moderation purposes
Stars: ✭ 21 (-32.26%)
Mutual labels:  discord-bot, discord-js
hellsnakebot
🤖About A fully customizable bot built with discord.js
Stars: ✭ 14 (-54.84%)
Mutual labels:  discord-bot, discord-js
discord-10man
Discord bot for CS:GO Scrims and Pugs
Stars: ✭ 34 (+9.68%)
Mutual labels:  discord-bot, scrims
modmail.js
A Simple Discord Modmail Bot Template
Stars: ✭ 33 (+6.45%)
Mutual labels:  discord-bot, discord-js
Discord-EmojiToRole
A discord.js bot that assigns roles based on reactions to a message.
Stars: ✭ 55 (+77.42%)
Mutual labels:  discord-bot, discord-js
yumeko
The real yumeko UwU. Rewrite: https://github.com/youKnowOwO/yumeko-ts
Stars: ✭ 28 (-9.68%)
Mutual labels:  discord-bot, discord-js
Music-Slash-Bot
A music bot written in Discord.js and Distube using the slash command
Stars: ✭ 34 (+9.68%)
Mutual labels:  discord-bot, discord-js
coolme
A 🌜⚽⚽👢 Discord bot, invite ➡
Stars: ✭ 13 (-58.06%)
Mutual labels:  discord-bot, discord-js
DiscordBot-Template
A boilerplate / template for discord.js bots with 100% coverage of Discord API, command handler, error handler based on https://discordjs.guide/
Stars: ✭ 129 (+316.13%)
Mutual labels:  discord-bot, discord-js
aero-bot
A general purpose discord bot that also functions as the flagship example bot using AeroClient
Stars: ✭ 11 (-64.52%)
Mutual labels:  discord-bot, discord-js
LenoxBot
🖥️ LenoxBot is a Discord bot that offers many cool new features to your Discord server!
Stars: ✭ 218 (+603.23%)
Mutual labels:  discord-bot, discord-js
michelle
An anime-centric bot for Discord
Stars: ✭ 12 (-61.29%)
Mutual labels:  discord-bot, discord-js
ZuraaaBot
Discord bot para o Zuraaa!
Stars: ✭ 17 (-45.16%)
Mutual labels:  discord-bot, discord-js
DiscordTickets
A cool Discord bot to manage tickets on your server !
Stars: ✭ 46 (+48.39%)
Mutual labels:  discord-bot, discord-js
Azuma
A package that actually syncs your ratelimits across all your clusters on Discord.JS
Stars: ✭ 19 (-38.71%)
Mutual labels:  discord-bot, discord-js

ScrimBot

Add ScrimBot to server

ScrimBot Support

ScrimBot is Discord bot meant to allow for the easy creation of VALORANT custom matches.

You tell the bot how many players per team, when the match will be and what map you would like and the bot will do the rest. Interested players can then react to the message to join a team, and once the match is complete you can add the final score and the match will be recorded for posterity.

Players can also tell the bot their competitive rank and it will automatically assign them a role in all servers that they share with the bot.

ScrimBot is based off Mountainz.

Running this yourself

Deploy

Requirements:

  1. MongoDB instance (https://www.mongodb.com/cloud/atlas)
  2. Discord Bot Token (https://discord.com/developers/applications)
  3. Node.js Version 12 or higher (https://nodejs.org/en/download/)

Instructions:

ScrimBot configuration is handled through environment variables. These can be set inside your terminal, on your hosting platform, or using a file named .env in the project directory.

Here's a helpful guide on how to set them up for your platform: https://www.twilio.com/blog/2017/01/how-to-set-environment-variables.html

For the purposes of this guide, we'll be using a .env file, which is the easiest option.


  1. Clone the repository
$ git clone https://github.com/SchwaIndustries/ScrimBot.git
$ cd ScrimBot
  1. Create a file named .env in the root directory of the bot with the following contents:
TOKEN=<discord bot token>
TIME_ZONE=<(OPTIONAL) desired time zone (https://en.wikipedia.org/wiki/List_of_tz_database_time_zones), default is America/Los_Angeles>
PREFIX=<(OPTIONAL) desired bot prefix, default is v!>
MONGO_URI=<mongo uri>
  1. Replace <discord bot token> with your bot token

  2. Replace <mongo uri> with your MongoDB connection string

  3. Run npm install to install bot dependencies

  4. Run npm start and the bot should be online!

  5. You can add yourself as a bot admin by modifying your user entry in the database. In the users collection, find your user ID and add a field named admin with the boolean value of true. This will allow you to access certain bot admin commands.

Migration from Cloud Firestore:

If you had previously ran an instance of ScrimBot before it migrated to MongoDB, this section will help you transition your data over.

  1. Use an existing Google Cloud service account or create a service account key for your project (https://cloud.google.com/iam/docs/creating-managing-service-account-keys#creating_service_account_keys)

  2. Install node-firestore-import-export

npm install -g node-firestore-import-export
  1. Export your data to a file
firestore-export --accountCredentials <service account key file> --backupFile firestore-dump.json --prettyPrint
  1. Execute the following Node script to clean up the data
const fs = require('fs')
const original = JSON.parse(fs.readFileSync('./firestore-dump.json', { encoding: 'utf8' }))

const converted = {
  guilds: [],
  matches: [],
  users: []
}

// parse guilds
for (const guildID in original.__collections__.guilds) {
  const guild = original.__collections__.guilds[guildID]

  delete guild.__collections__

  // some guilds only have linked matches and have never run v!server add
  if (guild.name) {
    converted.guilds.push({
      _id: guildID,
      ...guild
    })
  }
}

// parse matches
for (const matchID in original.__collections__.matches) {
  const match = original.__collections__.matches[matchID]

  delete match.__collections__
  match.timestamp = new Date(parseInt(match.timestamp.value._seconds + '' + match.timestamp.value._nanoseconds.toString().slice(0, 3)))
  if (match.date) match.date = new Date(parseInt(match.date.value._seconds + '000'))
  match.players.a = match.players.a.map(user => {
    if (!user.value) console.log(matchID)
    return user.value.split('/').pop()
  })
  match.players.b = match.players.b.map(user => {
    return user.value.split('/').pop()
  })
  if (match.spectators) {
    match.spectators = match.spectators.map(user => {
      return user.value.split('/').pop()
    })
  }

  converted.matches.push({
    _id: matchID,
    ...match
  })
}

// parse users
for (const userID in original.__collections__.users) {
  const user = original.__collections__.users[userID]

  delete user.__collections__
  user.timestamp = new Date(parseInt(user.timestamp.value._seconds + '' + user.timestamp.value._nanoseconds.toString().slice(0, 3)))
  user.matches = user.matches.map(match => {
    return match.value.split('/').pop()
  })

  converted.users.push({
    _id: userID,
    ...user
  })
}

fs.writeFileSync('./converted-guilds.json', JSON.stringify(converted.guilds))
fs.writeFileSync('./converted-matches.json', JSON.stringify(converted.matches))
fs.writeFileSync('./converted-users.json', JSON.stringify(converted.users))
  1. Log into your MongoDB instance and import your data!

Let us know if you run into any issues migrating your data.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].