#error on bot

1 messages · Page 1 of 1 (latest)

blazing raven
#

bot.run("token")

dense vector
#

Nice token

blazing raven
#

hello

#

lol

dense vector
#

You can create now a new one

blazing raven
#

lol my token is there

blazing raven
dense vector
#

Get a new Token

blazing raven
#

whats the error tho

dense vector
#

For the bot

blazing raven
#

but whats the error

#

i can syntax error on bot

dense vector
#

I Downloaded the Screenshot and can only see your bot.run code

blazing raven
#

yeh

#

cus i blured my token

#

now i reset it

#

how do u do the thing to hide ur token tho

blazing raven
#

tho

dense vector
#

.

blazing raven
#

anyways can u help me

#

i dont understand the syntax error

#

as i have never got it for that

dense vector
#

Can you show the code?

blazing raven
#

sure

#

import discord

from dhooks import Webhook

hook = Webhook("https://discord.com/api/webhooks/1046062912944488498/Ipu2NDXA2x-ofXjS5Ppf8wzwoSM-Xk_")

bot = discord.Bot()

@bot.event
async def on_ready():
print(f"We have logged in as {bot.user}")
hook.send("hello")

#s

#s
@bot.slash_command(guild_ids=[1046324619877023814])
async def hello(ctx):
await ctx.respond("Hello!")

@bot.slash_command(guild_ids=[1046324619877023814])
async def ping(ctx):
await ctx.respond("Pong 0.1")

#1046324619877023814
#689804309176778768

server = [1009750039222038570]

@bot.slash_command(guild_ids= server)

bot.run("think of this as my token")

dense vector
#

Also hide the webhook

blazing raven
#

there

#

wow i am bad at hiding stuff

#

i found out the problem

#

thanks for help ig

#

but how do u do the import thing like

golden onyx
dense vector
#
  1. For testing you can add debug_guilds=[] to the discord.Bot so you dont have to copy and paste it
blazing raven
#

some youtubers when they show there code or something they have import some other file

golden onyx
blazing raven
#

and they just write token in the token area

blazing raven
golden onyx
#

Remove it then

#

It's probably the source of error

dense vector
#

^

blazing raven
golden onyx
#

what

blazing raven
#

but i am coding a slash command

#

thanks for helping

golden onyx
#

My pleasure ig