myślałem ze to cos z uprawnieniami bo w kodzie nie wyskakuje żaden błąd jednak nawet z uprawnieniami administratora nie reaguje
import discord
from discord.ext import commands
from discord.ext.commands import has_permissions
import random
Intents = discord.Intents.default()
Intents.members = True
Intents.messages = True
client = commands.Bot(command_prefix="%")
client.remove_command("help")
@client.event
async def on_ready():
print ("Bot juz Działa")
await client.change_presence(activity=discord.Game(name="#pomoc"))
@client.event
async def on_member_join(member):
kanal = discord.utils.get(member.guild.channels, id= tu jest id kanalu )
await kanal.send(f"Elo {member.mention}")
@client.event
async def on_member_remove(member):
kanal = discord.utils.get(member.guild.channels, id= tu jest id kanału )
await kanal.send(f"Naura {member.mame}")
@client.event
async def on_message(message):
slowa = ['jd','2137']
for i in slowa:
if i in message.content:
await message.channel.send ("Bruh nie ładnie tak pisać >'(")
@client.command()
async def losuj (ctx, min: int , max: int):
if (min < min ):
numer = random.randrange(min,max)
await ctx.channel.send("wylosowałeś {numer}")
else:
numer = random.randomrange(max,min)
await ctx.channel.send("wylosowałeś {numer}")
@client.command
async def jaktam(ctx):
tablica = ("twoja stara","jaja se robisz?","fajno","git","słabo","beznadziejnie","kys","chciałbyś by było dobrze")
await ctx.channel.send(random.choice(tablica))
@client.command()
async def help(ctx):
embed=discord.Embed(color=0xf109bf)
embed.set_author(name="twoja pomoc ", url="https://www.youtube.com/watch?v=dQw4w9WgXcQ", icon_url="https://images-ext-2.discordapp.net/external/Nqz02hNVmk2EvlogFaRrmQm2iS9W8ab07lgrXW3jp_A/%3Fsize%3D128/https/cdn.discordapp.com/avatars/604048828860989472/7dbb83913e7dccde44e84e9bb151c195.png")
embed.add_field(name="pomoc", value="wyświetla pomoc", inline=False)
embed.add_field(name="kick ", value="wywala typa z serwera ", inline=True)
embed.add_field(name="ban", value="lepa na łep ", inline=True)
embed.add_field(name="tu bedzie tego wiecej ", value="tak na serio ", inline=True)
embed.set_footer(text="by Paweł ")
await ctx.channel.send(embed=embed, delete_after = 30)
@client.command()
@has_permissions(ban_members=True)
async def ban(ctx, member : discord.Member, reason = "Tak o bo moge"):
await member.ban(reason=reason)
await ctx.channel.send(f"Dostał bana {member.mention} {reason}")
@client.command()
@has_permissions(kick_members=True)
async def kick(ctx, member : discord.Member, reason = "Tak o bo moge"):
await member.kick(reason=reason)
await ctx.channel.send(f"został wyrzucony <@{member.id}> Sadge {reason}")
@client.command()
async def graj(ctx,game):
await client.change_presence(activity=discord.Game(name=game))
client.run("tu jest token")