fix: Ticket dm output for error checking
All checks were successful
Build Docker / Build Docker (push) Successful in 57s
All checks were successful
Build Docker / Build Docker (push) Successful in 57s
This commit is contained in:
parent
9732bbcb47
commit
b454139988
7
bot.py
7
bot.py
@ -526,7 +526,10 @@ async def ticket(ctx):
|
||||
await ctx.response.send_message("This server is not registered",ephemeral=True)
|
||||
return
|
||||
await ctx.response.send_message("Creating ticket...",ephemeral=True)
|
||||
await support.create_ticket(str(ctx.user.id), str(ctx.guild.id))
|
||||
output = await support.create_ticket(str(ctx.user.id), str(ctx.guild.id))
|
||||
# Send user DM
|
||||
user = await client.fetch_user(int(ctx.user.id))
|
||||
await user.send(output)
|
||||
|
||||
|
||||
@tree.command(name="ticketaddserver", description="Add a server to the ticket system")
|
||||
@ -630,7 +633,7 @@ async def check_reminders():
|
||||
|
||||
print("Reminder sent for "+str(reminder), flush=True)
|
||||
reminders.remove(reminder)
|
||||
write_reminders(reminders)
|
||||
write_reminders(reminders)
|
||||
|
||||
|
||||
# When the bot is ready
|
||||
|
@ -43,7 +43,7 @@ async def create_ticket(user_id, server:str):
|
||||
return "Server not found"
|
||||
|
||||
tickets = ticketsData['server'][server]['tickets']
|
||||
if user_id != "admin":
|
||||
if user_id != str(client.application.owner.id):
|
||||
for ticket in tickets:
|
||||
if ticket['user_id'] == user_id and ticket['status'] == "open":
|
||||
return "You already have an open ticket"
|
||||
|
Loading…
Reference in New Issue
Block a user