Created
April 10, 2021 14:04
-
-
Save minibox24/0025c09ca3941fca541e31429f5bd019 to your computer and use it in GitHub Desktop.
Revisions
-
minibox24 created this gist
Apr 10, 2021 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,73 @@ import discord from discord.ext import commands from discord.http import Route bot = commands.Bot(command_prefix='!') @bot.command('youtube') async def youtube(ctx): voice = ctx.author.voice if not voice: return await ctx.send('You have to be in a voice channel to use this command.') r = Route('POST', '/channels/{channel_id}/invites', channel_id=voice.channel.id) payload = { 'max_age': 0, 'target_type': 2, 'target_application_id': 755600276941176913 } try: code = (await bot.http.request(r, json=payload))['code'] except discord.Forbidden: return await ctx.send('I Need the `Create Invite` permission.') await ctx.send(embed=discord.Embed(description=f'[Click here!](https://discord.gg/{code})', color=0x2F3136)) @bot.command('betrayal') async def betrayal(ctx): voice = ctx.author.voice if not voice: return await ctx.send('You have to be in a voice channel to use this command.') r = Route('POST', '/channels/{channel_id}/invites', channel_id=voice.channel.id) payload = { 'max_age': 0, 'target_type': 2, 'target_application_id': 773336526917861400 } try: code = (await bot.http.request(r, json=payload))['code'] except discord.Forbidden: return await ctx.send('I Need the `Create Invite` permission.') await ctx.send(embed=discord.Embed(description=f'[Click here!](https://discord.gg/{code})', color=0x2F3136)) @bot.command('fishington') async def fishington(ctx): voice = ctx.author.voice if not voice: return await ctx.send('You have to be in a voice channel to use this command.') r = Route('POST', '/channels/{channel_id}/invites', channel_id=voice.channel.id) payload = { 'max_age': 0, 'target_type': 2, 'target_application_id': 814288819477020702 } try: code = (await bot.http.request(r, json=payload))['code'] except discord.Forbidden: return await ctx.send('I Need the `Create Invite` permission.') await ctx.send(embed=discord.Embed(description=f'[Click here!](https://discord.gg/{code})', color=0x2F3136)) bot.run('TOKEN')