Skip to content

Instantly share code, notes, and snippets.

@minibox24
Created April 10, 2021 14:04
Show Gist options
  • Select an option

  • Save minibox24/0025c09ca3941fca541e31429f5bd019 to your computer and use it in GitHub Desktop.

Select an option

Save minibox24/0025c09ca3941fca541e31429f5bd019 to your computer and use it in GitHub Desktop.

Revisions

  1. minibox24 created this gist Apr 10, 2021.
    73 changes: 73 additions & 0 deletions bot.py
    Original 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')