bot.remove_command(help)
@bot.command(pass_context= True)
@commands.has_permissions(administrator= False)
async def help(ctx):
embed = discord.Embed(title="Команды", color=0x2f38b1)
embed.add_field(name="*cat", value="Показать кота", inline=True)
embed.add_field(name="*ban", value="Для админов", inline=True)
embed.add_field(name="*kick", value="Для админов", inline=True)
embed.set_footer(text="Kilka21#5529 (C)")
await ctx.send(embed=embed)
iscord.ext.commands.errors.CommandRegistrationError: The command help is already an existing command or alias.
主页
/
user-439193
Kilka21's questions
#Кик
@bot.command( pass_context= True )
@commands.has_permissions ( administrator=True )
async def kick ( ctx, member:discord.member, *, reason= None ):
await ctx.channel.purge ( limit= 1 )
await member.kick (reason= reason )
line 476, in _actual_conversion
raise BadArgument('Converting to "{}" failed for parameter "{}".'.format(name, param.name)) from exc
discord.ext.commands.errors.BadArgument: Converting to "discord.member" failed for parameter "member".
import discord
import requests as requests
from discord.ext import commands
import json
import requests
bot = commands.Bot(command_prefix='*')
@bot.command()
async def kiska(ctx):
await ctx.send('Нету кисок:3')
bot.remove_command('info')
@bot.command()
async def info(ctx):
embed = discord.Embed(title="У нас есть бот поддержки в телеграме", description="@shluba_bot")
embed.set_footer(text="Иногда бот может не ответить")
await ctx.send(embed=embed)
bot.remove_command('help')
@bot.command()
async def help(ctx):
embed = discord.Embed(title="Список комманд")
embed.add_field(name="*kotik", value="Показвает котика:3", inline=True)
embed.add_field(name="*kiska", value="Пока-что в бете", inline=True)
embed.add_field(name="*info", value="Обратиться в поддержку", inline=True)
await ctx.send(embed=embed)
@bot.command()
async def fox(ctx):
response = requests.get('https://some-random-api.ml/img/fox') # Get-запрос
json_data = json.loads(response.text) # Извлекаем JSON
embed = discord.Embed(color=0xff9900, title='Random Fox') # Создание Embed'a
embed.set_image(url=json_data['link']) # Устанавливаем картинку Embed'a
await ctx.send(embed=embed) # Отправляем Embed
Ignoring exception in command None:
discord.ext.commands.errors.CommandNotFound: Command "fox" is not found