Browse Source

Merge branch 'master' into development

tags/v1.8.0
Roxie Gibson 6 years ago
parent
commit
c8f9eba2b6
1 changed files with 15 additions and 2 deletions
  1. +15
    -2
      roxbot/cogs/gss.py

+ 15
- 2
roxbot/cogs/gss.py View File

@@ -6,9 +6,11 @@ from discord.ext.commands import bot

import roxbot

gssp_id = 393764974444675073


def is_gss():
return commands.check(lambda ctx: ctx.guild.id == 393764974444675073)
return commands.check(lambda ctx: ctx.guild.id == gssp_id)


def is_not_nsfw_disabled():
@@ -24,11 +26,22 @@ async def tatsumaki_api_call(member, guild):
return await roxbot.http.api_request(url, headers={"Authorization": roxbot.tat_token})


class GaySoundsShitposts():
class GaySoundsShitposts:
def __init__(self, bot_client):
self.bot = bot_client
self.acceptable_roles = (394939389823811584, 394941004043649036)

async def on_member_join(self, member):
if member.guild.id == gssp_id:
role = discord.utils.get(member.guild.roles, id=450042170112475136)
await member.add_roles(role, reason="Auto-add role on join")
#channel = self.bot.get_channel(450040463794241536)
#await channel.send("Please read our <#396697172139180033> and <#422514427263188993> channels. To gain access to the server, you must agree to the rules.")

@bot.command()
async def agree(self, ctx):
role = discord.utils.get(ctx.author.guild.roles, id=450042170112475136)
return await ctx.author.remove_roles(role, reason="User has agreed the rules and has been given access to the server.")

@bot.command(hidden=True)
async def perms(self, ctx, role):

Loading…
Cancel
Save