Python хелп, слеш команда

  • Python
  • 0 Скачивания
  • 0 ratings
Всем привет сегодня я вам покажу код на /help на disnake

Код:
Развернуть Свернуть Копировать
    @commands.slash_command(description = 'Показывает список команд')
    async def help(self, interaction):
        button = Button(label="Information", style=disnake.ButtonStyle.primary, emoji='📄')
        button1 = Button(label="Moderation", style=disnake.ButtonStyle.primary, emoji='🛠')
        button2 = Button(label="Emoties", style=disnake.ButtonStyle.primary, emoji='😈')
        button3 = Button(label="Voice", style=disnake.ButtonStyle.primary, emoji='🎤')

        view=View()
        emb2 = disnake.Embed( title = f'Information', description = f'`*help` `*preds` `*slava` `*discord` `*qiwi` `*nora` `*idea` `*say` `*words` `*gay` `*search` `*balance` `*youtube` `*history` `*convk` `*conteleg` `*coninst` `*emojify` `*price`', colour = disnake.Color.blue() )
        async def button_callback(interaction):
            await interaction.response.edit_message(embed=emb2)
        button.callback = button_callback

        emb3 = disnake.Embed( title = f'Moderation', description = f'`*mute` `*unmute` `*ban` `*unban` `*kick` `*clear` `$autoban` `*warn` `*sniat` `*list`', colour = disnake.Color.blue() )
        async def button_callback(interaction):
            await interaction.response.edit_message(embed=emb3)
        button1.callback = button_callback

        emb4 = disnake.Embed( title = f'Emoties', description = f'`*kanava` `*smoke` `*cuddle` `*kiss` `*clap` `*hit`', colour = disnake.Color.blue() )
        async def button_callback(interaction):
            await interaction.response.edit_message(embed=emb4)
        button2.callback = button_callback
       
        emb5 = disnake.Embed( title = f'Voice', description = f'`*lock` `*unlock` `*block` `*unblock` `*name` `*limit`', colour = disnake.Color.blue() )
        async def button_callback(interaction):
            await interaction.response.edit_message(embed=emb5)
        button3.callback = button_callback

        view.add_item(button)
        view.add_item(button2)
        view.add_item(button1)
        view.add_item(button3)
        emb = disnake.Embed( title = f'ᅠᅠᅠᅠᅠᅠᅠᅠᅠᅠКоманды ботаᅠᅠᅠᅠᅠᅠᅠᅠᅠᅠᅠ', colour = disnake.Color.blue() )
        await interaction.response.send_message(embed=emb, view=view, ephemeral=True)

Если вам интересна какая либо команда, пишите я вам покажу код

Python Поиск видео по ютубу

  • Python
  • 0 Скачивания
  • 0 ratings
Всем привет сегодня я вам дам код для поиска по ютубу
youtube:
Развернуть Свернуть Копировать
    @commands.command()
    async def youtube(self, ctx, *, search):
        query_string = urllib.parse.urlencode({'search_query': search})
        htm_content = urllib.request.urlopen(
            'http://www.youtube.com/results?' + query_string)
        search_results = re.findall(r'/watch\?v=(.{11})',
                                    htm_content.read().decode())
        await ctx.send('http://www.youtube.com/watch?v=' + search_results[0])

    @youtube.error
    async def youtube_error(self, ctx, error):
        if isinstance ( error, commands.MissingRequiredArgument):
            gif1 = "https://images-ext-1.discordapp.net/external/fQhwLkamgTrE6eiSvEcFBv3JBZi_lH3RjPaNsBU_LFM/https/c.tenor.com/EfhPfbG0hnMAAAAC/slap-handa-seishuu.gif"
            emb = disnake.Embed(description = f'{ctx.author.mention} напишите сообщение.', colour = disnake.Color.blue() )
            emb.set_image(url=gif1)
            await ctx.send ( embed = emb)
            print(f"[Logs:error] Необходимо написать сообщение {ctx.author} | *youtube")

Python Еще команды к приват войсу

  • Python
  • 0 Скачивания
  • 0 ratings
Всем привет сегодня я вам покажу еще команды к приват войсу

Limit:
Развернуть Свернуть Копировать
    @commands.command()
    @commands.has_role('voice')
    async def limit(self, ctx, amount = 1):
        if ctx.author.voice and ctx.author.voice.channel:
            channel = ctx.author.voice.channel
            await channel.edit(user_limit = amount)
            if amount == 0:
                await ctx.channel.send(f'{ctx.author.mention} вы изменили лимит в канале на бесконечное кол-во человек')
            else:
                await ctx.channel.send(f'{ctx.author.mention} вы изменили лимит в канале на {amount} человек')

    @limit.error
    async def limit_error(self, ctx, error):
        if isinstance(error, commands.MissingRole):
            await ctx.send("Вы не владеете этим каналом или же вы не создали свой канал")
name:
Развернуть Свернуть Копировать
    @commands.command()
    @commands.has_role('voice')
    async def name(self, ctx, *, name = 'Не указано'):
        if ctx.author.voice and ctx.author.voice.channel:
            channel = ctx.author.voice.channel
            await channel.edit(name = name)
            await ctx.channel.send(f'{ctx.author.mention} вы изменили название канала на {name}')

    @name.error
    async def name_error(self, ctx, error):
        if isinstance(error, commands.MissingRole):
            await ctx.send("Вы не владеете этим каналом или же вы не создали свой канал")
block:
Развернуть Свернуть Копировать
    @commands.command()
    @commands.has_role('voice')
    async def block(self, ctx, member: disnake.Member = None):
        if member is None:
            return await ctx.send("Пользователь не указан")
        if member.bot is True:
            return await ctx.send("Вы не можете заблокировать бота")
        if member == ctx.author:
            return await ctx.send("Вы не можете заблокировать себя")
        if ctx.author.voice and ctx.author.voice.channel:
            channel = ctx.author.voice.channel
            await channel.set_permissions(member, connect = False)
            await member.move_to(channel=None)
            await ctx.channel.send(f'{ctx.author.mention} вы заблокировали {member.mention}')

    @block.error
    async def block_error(self, ctx, error):
        if isinstance(error, commands.MissingRole):
            await ctx.send("Вы не владеете этим каналом или же вы не создали свой канал")
Unblock:
Развернуть Свернуть Копировать
    @commands.command()
    @commands.has_role('voice')
    async def unblock(self, ctx, member: disnake.Member):
        if ctx.author.voice and ctx.author.voice.channel:
            channel = ctx.author.voice.channel
            await channel.set_permissions(member, connect = True)
            await ctx.channel.send(f'{ctx.author.mention} вы разблокировали {member.mention}')

    @unblock.error
    async def unblock_error(self, ctx, error):
        if isinstance(error, commands.MissingRole):
            await ctx.send("Вы не владеете этим каналом или же вы не создали свой канал")

LUA XP WARN DEV 1.0

Аддон XP WARN написан мною за 1.2 часа. Варны сохраняются в таблицу mysql. Все файлы которые нужны я закинул в архив их нужно положить в addons
Подключать базу данных нужно по этим путям
xp_warn/lua/xp_warns/mysql.lua
xp_warn/lua/xp_warns/xp_config.lua

LUA Anti-cheat

Для наших любимых новичков не делаю ограничения на скачивание скриптика.

Закинуть данное дерьмецо можно в addons

Пользователи онлайн

Статистика форума

Темы
29,181
Сообщения
187,204
Пользователи
129,139
Новый пользователь
zxcrurik
Назад
Сверху Снизу