NightmareTaken
@NightmareTaken
I've been trying to figure out how to do basic moderation commands for my discord bot(Kick, ban, mute) but I can figure it out. Can someone help me. T
What code do I need to use to be able to use uptime robot with node.js on replit for my discord bot?
SixBeeps You need to start an HTTP server one way or another, then link UTR to the auto-generated link for that server.2 years ago
Do people need my replit link to view it?
Coder100 to run the code, you can either send the link of the post (like this), which will have the repl attached, but a standalone repl will require the link.
https://docs.repl.it/repls/embed2 years ago
RYANTADIPARTHI no. When you post it, people can automatically view the repl. No need to give the link.2 years ago
JBloves27 Not necessarily. You can post it as well. But yes, that is the only way.
I hope this helps!2 years ago
How do I take my discord bot token from a .env file and use it in another file without just copy and pasting it(node.js)
WWEMONSTERMONST To get a variable from .env file:
1) goto shell and do npm init -y (or repl will perform this step automatically when you execute the code in step 3)
2) goto shell and do npm install dotenv (same as step 1)
3)
require('dotenv').config();
const token = process.env['TOKEN'];
//where TOKEN is your env variable name
console.log(token);
//i did console.log to see if its working you dont need to do that
and this will do it!2 years ago
How do I add a status to my discord bot that I've coded in python?
JBloves27 You should do the following:
async def on_ready():
activity = discord.Game(name="Netflix", type=3)
await bot.change_presence(status=discord.Status.idle, activity=activity)
print("Bot is ready!")
I hope this helps!2 years ago