#๐Ÿ”’ i need help with a discord bot that creates me support ticket

271 messages ยท Page 1 of 1 (latest)

undone houndBOT
#

@somber haven

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

somber haven
#

so bassically

#

when i run the bot

#

and try using the command for the support tickets

#

it says

#

command not found

pliant trail
#

Share the screenshot

somber haven
#

screenshot of what it says

#

when i run the bot

#

and command?

#

or screenshot of the code

#

@pliant trail

#

here

#

@pliant trail

undone houndBOT
# somber haven

Please react with โœ… to upload your file(s) to our paste bin, which is more accessible for some users.

abstract yew
#

where did you get this code from

#

@somber haven

somber haven
#

it

#

from a bot dev

#

:p

#

but

#

he wont fix it

#

and i need help

abstract yew
#

why not ๐Ÿค”

#

you paid for non-working code?

somber haven
#

everything else

#

worked

#

except for this part

#

:p

abstract yew
#

you have a command like this

@bot.command()
async def setup_ticket(ctx):

where you define the command, but you need to add it to the bot

#

lemme look up the doc 1 sec

somber haven
#

kk

#

btw

#

i dont know

#

almost anything

#

abt this

abstract yew
somber haven
#

so wait

#

what do i gotta do?

abstract yew
#

Hm lemme think

somber haven
abstract yew
#

How are you running the bot

#

and how did you invoke the command in discord?

#

Hm I mean....... I feel like it should work

#

Are you sure you haven't modified the file and haven't saved it?

#

running an old version?

#

we could also try rename the command and try again

somber haven
#

im pretty sure

#

i didnt change anything

#

in the files

#

except for guild ids

#

and yk

#

ima try changing the command

#

nd see if it will work

heady quail
#

Can you screenshot the code itself rather than the terminal log. Mightvbe able to find the issue. Just make sure to mark over / hide any tokens if they are in the code file itself.

abstract yew
somber haven
heady quail
#

ah lol was on my phone for a min. idk how i over looked that.

somber haven
#

changing command

#

didnt work

#

@abstract yew '

#

@heady quail

#

๐Ÿ˜ญ

#

changing command

#

didnt work

heady quail
#

what EXACTLY did you type into discord when you tried to use the command?

#

did you type support_ticket

#

or did you try psupport_ticket

#

sorry not support..... setup.

somber haven
#

cuz

#

i changed the command

heady quail
#

ok just checking its an easy oversight

somber haven
#

my other bot files

#

aswell

#

or only this one

#

?

#

but thats for another ticket sistem

#

its sm else

heady quail
#

wait...... mayyyyyyyyyybe......

#

I FOUND A TYPO.

somber haven
#

wym

#

???

heady quail
#

in the embed

#

Ticker........... instead of Ticket

#

in the description

somber haven
#

hm

#

where

#

???

#

FOUND IT

#

cheers

#

leme try rn

#

and let you klnow

heady quail
somber haven
#

leme try it

#

rn

heady quail
#

๐Ÿคž

somber haven
#

still doesnt work

#

@heady quail

heady quail
#

hmmmm.

somber haven
#

yup

heady quail
#

yep... im sorry but this seems to be the only issue i can find.

somber haven
#

maybe its from that

heady quail
#

though i am far from being "good" so its likely something i overlooked or just dont know.

#

couldnt hurt.

somber haven
#

dang

#

kk

#

leme js

#

remove my token

#

rq

wide shuttle
heady quail
#

yeah make sure to do that lol

somber haven
#

its js for the uhh

#

support part

#

but

#

WAIT

#

what if

#

i try changing

#

the prefix

#

since i got

#

same prefix

#

on 2 dif commands

#

???

undone houndBOT
# somber haven

Please react with โœ… to upload your file(s) to our paste bin, which is more accessible for some users.

wide shuttle
#

the file you shared is a standalone program. If you are running a different file then nothing in that file will work unless you import it.

somber haven
#

these r both

#

i sent both

#

yall need

#

req

#

aswell?

#

the requirements

wide shuttle
#

You need to integrate the code from the second file into your main program. You can use extensions or just put the cog in your main file.

somber haven
#

@heady quail

somber haven
#

ik i sound dumb

#

so

#

il js insert

#

all i had on the support ticket

#

js like that?

#

js copy n paste all of it

#

???

#

@wide shuttle

#

@heady quail

#

uhh

#

i tried putting all

#

into a single file

#

and still

#

doesnt work

#

@wide shuttle

#

still nothing works

heady quail
#

ok. is your support_tickety.py file inside the same folder as your main.py?

somber haven
#

rn yes

#

@heady quail

heady quail
#

ok try at the top of your main.py file. where you import discord / random / string/ and asyncio. to add this......

somber haven
#

this what?

heady quail
#

one sec

somber haven
#

kk sure

heady quail
#

from support_ticket import TicketButton, CloseButton

#

support_ticket should be the name of that file itself.

#

without the .py

somber haven
#

pause pause

#

so

#

my support tickets file name

#

should only bew

#

support_ticket

#

?

heady quail
#

cant see that from what you have shared. would show in your IDE where you switch between the files to view them

somber haven
#

into my

#

support_ticket file

#

?

heady quail
#

into your main file.

somber haven
#

kk

heady quail
#

near the top where you import all the other libraries

somber haven
#

like this?

heady quail
#

one sec.

somber haven
#

kk

heady quail
#

like this

#

DELETE THIS IT HAS YOUR TOKEN

somber haven
#

oop

#

tysm

heady quail
#

lol

#

np

#

but where that says support_ticket it needs to have the name of your file that contains the support ticket code

somber haven
#

like this?

heady quail
#

yep

somber haven
#

and files like this?

heady quail
#

Wfym?

#

Wdym?*

somber haven
#

u told me

#

to rename files

heady quail
#

If you look in your IED program you should see a file explorer windows that shows all the internal files for your bot. The one containing your support ticket needs to be named in the--- from that file name here import ******** , ****** statement ---

somber haven
#

huh

#

๐Ÿ˜ญ

heady quail
#

You didn't need to rename any files... you only needed to change the fist thing (support_ticket) to the name of that file.

somber haven
#

1 sec

#

ima brb

#

kk

#

like this?

#

@heady quail

heady quail
#

that shows me nothing. lol.

somber haven
#

u told me to change the ---

#

to .

#

,*

#

lets see

#

if it will work now

#

.

#

oh wait

#

nvm

#

wait one sec

heady quail
# heady quail

i told you to change THIS...... only this..... and to put the name of that file that contains your support ticket code in that spot with the red square....

somber haven
#

OH WAIT

#

i get it now

#

this time

#

it appeared

#

dif

#

maybe it will work

#

YES

#

IT WORKS

#

OMG

#

IT WORKS

#

IT WORKSSSS

heady quail
#

๐Ÿ‘

somber haven
#

BUT WAIT

#

ticket

#

tickets

#

arent being

#

created

#

it shows this

#

look

#

what does it mean?

#

done

#

i fixed it myself

#

i love you dude

#

i hope the best for you

#

and your family

#

n god bless you

heady quail
#

best of luck

#

!close

somber haven
#

bro

somber haven
#

now my

#

phalalpost

#

doesnt work

#

๐Ÿ˜ญ

#

i swear bro

somber haven
#

please

#

๐Ÿ˜ญ

#

im mad sorry

#

i can screenshare you

#

if u want

undone houndBOT
#
Python help channel closed for inactivity

This help channel has been closed. Feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.