瀏覽代碼

added autoadd role to gssp cog because summer made me

tags/v1.7.1
Roxie Gibson 6 年之前
父節點
當前提交
0e9619c5f3
共有 1 個檔案被更改,包括 8 行新增2 行删除
  1. +8
    -2
      roxbot/cogs/gss.py

+ 8
- 2
roxbot/cogs/gss.py 查看文件

@@ -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,15 @@ 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")

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

Loading…
取消
儲存