import os
import discord
import random
import aiohttp
command_prefix = '!'
intents = discord.Intents.default()
intents.messages = True
intents.guilds = True
intents.members = True
client = discord.Client(intents=intents)
@client.event
async def on_ready():
print(f'Logged in as {client.user}!')
@client.event
async def on_message(message):
if message.author == client.user:
return
if message.content.startswith(f'{command_prefix}gayrate'):
parts = message.content.split()
member = message.mentions[0] if message.mentions else message.guild.get_member_named(parts[1]) if len(parts) > 1 else None
if not member:
await message.channel.send('Please mention a user or provide a username.')
return
if member.display_name == "_gotflamingo":
await message.channel.send(f'{member.mention} ER SLET IK GAY :rainbow_flag:')
return
if member.display_name == "julemandenersej":
await message.channel.send(f'{member.mention} SUTTER DAGLIGT PIK :rainbow_flag:')
return
gay_rate = random.randint(0, 100)
embed = discord.Embed(title=f'{member.display_name}\'s Gay Rate :rainbow_flag:', color=0xff69b4)
embed.add_field(name="", value=f'{member.mention} har en gay rate på {gay_rate}% :rainbow_flag:')
embed.set_thumbnail(url=member.avatar_url)
await message.channel.send(embed=embed)
client.run('MY TOKEN')
#My Message did not send and zero errors
1 messages · Page 1 of 1 (latest)
huh
How to use print statements to debug your code
Go debug it yourself and come back with the specific thing thats not working
"It doesnt work" leaves a lot of missing context, and I'm not able to run it myself at this time
You use dpy
I literally sent "user tags" app before
