Giter Club home page Giter Club logo

kevin-kwan / cutiebot Goto Github PK

View Code? Open in Web Editor NEW
20.0 2.0 2.0 635 KB

A custom, multi-purpose, open-source Discord Bot using DiscordJS v14 and MongoDB that can play music, chat with you using OpenAI ChatGPT, manage your Economy, moderate your server, and provide other fun features. Currently supports Discord's Slash Commands.

JavaScript 99.36% Dockerfile 0.64%
discord discord-js discord-bot discord-bot-template node-js nodejs discordjs-v13 discordbot discordjs-v14 javascript

cutiebot's Introduction

CutieBot v2

About

A custom, multi-purpose Music, Economy, Moderation, and Fun Discord Bot using Discord JS. This bot has slash command support. Also has ChatGPT functionality allowing for models 3.5 and 4 to be used, so you can chat with the bot! This bot can also play music and has an economy system as well utilizing MongoDB, so it is easy to set up and use! Feel free to contribute. More features to come! The currently hosted bot has ~1,100 users.

How To Run/Host this Bot Yourself

todo

cutiebot's People

Contributors

deepsource-autofix[bot] avatar deepsource-io[bot] avatar dependabot[bot] avatar kevin-kwan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

cutiebot's Issues

Interaction errors with slash commands (music)

I am aware of there sometimes being interaction errors related to music commands.
I'm using "await" and "deferReply" but still doesn't seem to be fixing the issues.

Will continue to look into it and keep an eye on the issue. If anyone knows a fix, please let me know.

Add League of Legends Commands

The purpose of these are to learn how to use Riot's API.
Slash commands ofc.

Here are some ideas:

  • Check the stats (rank, winrate, recently played champs, mains, etc.) of a player given username and tag (two separate fields)
  • Check a person's status (in-game, which gamemode) given the same params
  • Check a champion's winrate and stats
  • Mastery Info of a player
  • Check if the player is queued with anyone (the last one might need some tuning to address false positives because you might get lucky and get into the same game as someone, I've had this happen like 5-6 times in a row)
  • Get latest patch notes (not sure how I'm gonna do this)
  • Get Champion Abilities Info (might need another API to get the number values, not sure)

This list will continue to expand. Just some ideas.

write documentation

if this project gets bigger, we should definitely create documentation about the commands and whatnot
could prob use the wiki on github
or make another repo that houses website hosted on github pages

implement conversation history for ChatGPT

  • conversation history/memory should be stored in a database (tested with MongoDB at work, works fine) for each user instead of sharing a history across all servers and users
  • probably looking into langchain for implementation since we can add more tools to make the bot more fun like access to the internet

Slash commands in DMs

i dont know if it's because of the node/discordjs update or what

but the guildonly boolean is essentially useless now, and no matter what, you can execute commands in the bot dms

maybe i forgot an intent in index.js? but i'm pretty sure i included all intents

Slash Commands showing up twice

image
Seems like slash commands are duplicated and show up twice after loading. Not sure why this is the case.
Tried looking up a solution online, thought I handled the cases here:

CutieBot/src/loader.js

Lines 52 to 76 in 5aadb8b

if (client.config.app.global) {
const guilds = guildIds
guilds.forEach(guild => {
if (client.guilds.cache.get(guild).commands.cache.size > 0) {
client.guilds.cache.get(guild).commands.set([])
}
})
if (client.application.commands.cache.size > 0) {
client.application.commands.set([])
console.log("Global slash commands reset!")
}
client.application.commands.set(CommandsArray)
console.log("Slash commands set globally!")
} else {
const guilds = guildIds
if (client.application.commands.cache.size > 0) {
client.application.commands.set([])
console.log("Global slash commands reset!")
}
guilds.forEach(guild => {
if (client.guilds.cache.get(guild).commands.cache.size > 0) {
client.guilds.cache.get(guild).commands.set([])
}
client.guilds.cache.get(guild).commands.set(CommandsArray)
})

But it don't work.
Unlucky.

music features

this new project might be a good opportunity to make a functioning music playing system

todo:
look into ytdl

create a dynamic help menu

can probably revamp or modify the current way that commands are loaded
i looked at this video and it looks promising
https://www.youtube.com/watch?v=PKWSbm1D7Os

but we definitely need a help command once we add a ton of commands

in the old version of the bot, i manually typed all the commands and their descriptions lol

Add Valorant Commands

The purpose of these are to learn how to use Riot's API.
We are using slash commands of course.

Here are some ideas:

  • Check the stats of a player (rank, winrate, recently played or best agents, mains, best maps etc.) of a player given username and tag (two separate fields)
  • Check a person's status (in-game, which gamemode) given the same params
  • Check an agent's winrate and stats and tier
  • Mastery Info/Playtime of a player
  • Check if the player is queued with anyone (the last one might need some tuning to address false positives because you might get lucky and get into the same game as someone, I've had this happen like 5-6 times in a row)
  • Get latest patch notes (not sure how I'm gonna do this)
  • Get Agents' Abilities Info (might need another API to get the number values, not sure)

This list will continue to expand. Just some ideas.

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.