Skip to content

Xanderxx46/Xan-Utils

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Why This Exists?

I made this bot to get more experience using Carbon! It has some things i say often just as slash commands. Feel free to add it here. Idk why you would but just in case you want to.

Adding to Main Bot:

If you want to add your own customized messages to the main bot:

  1. Go to the ask-vc.ts file

  2. Go to line 23 and add the following:

const YOUR_DISCORD_NAME = "YOUR_DISCORD_ID"
  1. From here you have 2 different options:

Option 1: Static Messages

  1. Go to line 69 of the ask-vc.ts file and add an else if statement.

  2. It should look something like this:

else if (userId === YOUR_DISCORD_NAME) { await interaction.reply({ content: "YOUR_MESSAGE_HERE"}); }

Option 2: Random Messages

  1. Copy src/random-messages/example folder (replace example with your name)

  2. Replace the example messages with anything you want, it should look like this.

module.exports = [ 
"Hello, want to vc?",
"Hey can you vc?",
"Hey bro, can you vc?",
]
  1. After adding your file, go down to line 12 of the ask-vc.ts file and add the following (replace example with your name):
import exampleRandom from "../random-messages/example/example"
  1. Then you can go to line 46 of the ask-vc.ts file and add the following (replace example with your name):
const askExampleMessage = getRandom(exampleRandom);
  1. Go to line 69 of the ask-vc.ts file and add the following (replace example with your name):
else if (userId === YOUR_DISCORD_NAME) { await interaction.reply({ content: askExampleMessage}); }

Hosting Your Own (Using Cloudflare workers):

To host your own version of the bot:

  1. First you must clone the bots repo, do so by running these commands:
git clone https://github.com/Xanderxx46/Xan-Utils
cd Xan-Utils
  1. Then, you need to install the dependencies:
npm install
  1. Then, add all the varibles:
npx wrangler secret put CLIENT_ID
npx wrangler secret put PUBLIC_KEY
npx wrangler secret put DISCORD_TOKEN
  1. Then you can run the bot using:
npm run build
  1. Once given the bots worker url, go to https://xan-utils.{YOUR_CLOUDFLARE_NAME}.workers.dev/deploy to deploy the commands.

  2. Dont forget to go to the Discord Dev Portal and add https://xan-utils.{YOUR_CLOUDFLARE_NAME}.workers.dev/interaction as your interaction URL.

Hosting the bot any other way:

To host the bot any other way, please use the Carbon Docs to convert the index.ts file to use any thing else.

Adding more commands:

You can use the Carbon Docs to make more commands.

About

Fun little bot i wrote to try more Carbon.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published