async def _set(self, ctx: SlashContext, **kwargs):
        user = await get_user_obj_admin(ctx, kwargs)
        if not user:
            return

        # check if id is an int
        try:
            kwargs["steamid"] = int(kwargs["steamid"])
        except ValueError:
            await ctx.send(
                hidden=True,
                embed=embed_message(
                    f"Error",
                    f"The argument `steamid` must be a number. \nPlease try again"
                ))
            return

        # save id
        await setSteamJoinID(user.id, kwargs["steamid"])

        # update the status msg
        await steamJoinCodeMessage(self.client, ctx.guild)

        # react to show that it is done
        await ctx.send(hidden=True,
                       embed=embed_message(f"Success",
                                           f"I've done as you asked"))
Beispiel #2
0
    async def handle(self, params, message, mentioned_user, client):
        partialName = " ".join(params)
        clansearch = []
        for clanid in clanids:
            returnjson = await getJSONfromURL(
                f"https://www.bungie.net/Platform/GroupV2/{clanid}/Members?nameSearch={partialName}"
            )
            clansearch.append(returnjson)

        embed = embed_message(f'Possible matches for {partialName}')

        for result in clansearch:
            resp = result['Response']
            if not resp['results']:
                await message.channel.send(embed=embed_message(
                    f'Possible matches for {partialName}', "No matches found"))
                return

            i = 0
            for guy in resp['results']:
                i += 1
                steam_name = guy['destinyUserInfo']['LastSeenDisplayName']
                bungie_name = guy['bungieNetUserInfo']['displayName']
                destinyID = guy['destinyUserInfo']['membershipId']
                discordID = lookupDiscordID(destinyID)
                embed.add_field(
                    name=f"Option {i}",
                    value=
                    f"Discord - <@{discordID}>\nSteamName - {steam_name}\nBungieName - {bungie_name}",
                    inline=False)

        await message.channel.send(embed=embed)
    async def _blacklist(self, ctx: SlashContext, action, user):
        if action == "Blacklist":
            if ctx.author == user:
                await ctx.send(
                    hidden=True,
                    embed=embed_message(
                        "Error",
                        f"Mate, you cannot blacklist yourself. That is just stupid"
                    ))
                return

            await add_lfg_blacklisted_member(ctx.author.id, user.id)
            await ctx.send(
                hidden=True,
                embed=embed_message(
                    "Success",
                    f"{user.display_name} has been added to your personal blacklist and will not be able to join your events"
                ))

        elif action == "Un-Blacklist":
            await remove_lfg_blacklisted_member(ctx.author.id, user.id)
            await ctx.send(
                hidden=True,
                embed=embed_message(
                    "Success",
                    f"{user.display_name} has been removed from your personal blacklist and will be able to join your events again"
                ))
Beispiel #4
0
    async def _rollreaction(self, ctx: SlashContext, draws: int):
        tmessage = (await ctx.channel.history(limit=1).flatten())[0]
        if not tmessage:
            await ctx.send(hidden=True, embed=embed_message(
                "Error",
                "Getting message failed"
            ))
            return

        reactionlist = tmessage.reactions
        userlist = []
        for reaction in reactionlist:
            userlist += await reaction.users().flatten()
        uniqueusers = []
        for u in userlist:
            if u not in uniqueusers:
                uniqueusers.append(u)

        if len(uniqueusers) < draws:
            await ctx.send(hidden=True, embed=embed_message(
                "Error",
                "Not enough reactions found"
            ))
            return
        winners = [winner.mention for winner in random.sample(uniqueusers, draws)]
        await ctx.send(embed=embed_message(
            "Draw Result",
            f"Selected users {', '.join(winners)}"
        ))
    async def _registerdesc(self, ctx: SlashContext):
        await ctx.send(hidden=True,
                       embed=embed_message(
                           f"Thanks for Registering",
                           f"I sent you a DM with the next steps!"))

        URL = f"https://www.bungie.net/en/oauth/authorize?client_id={BUNGIE_OAUTH}&response_type=code&state={str(ctx.author.id) + ':' + str(ctx.guild.id)}"
        await ctx.author.send(embed=embed_message(
            f'Registration', f'[Click here to register with me]({URL})',
            "Please be aware that I will need a while to process your data after you register for the first time, so I might react very slow to your first commands."
        ))
    async def handle(self, params, message, mentioned_user, client):
        destinyID = lookupDestinyID(mentioned_user.id)
        system = lookupSystem(destinyID)

        if not (destinyID and system):
            await message.channel.send(embed=embed_message(
                'Error',
                f'Problem getting your data, please `!registerdesc` to fix this'
            ))

        await message.channel.send(embed=embed_message(
            'Nightfall Report',
            f'https://nightfall.report/guardian/{system}/{destinyID}'))
    async def on_button_click(interaction: discord_components.Context):
        # look if they are lfg buttons
        if interaction.component.id.startswith("lfg"):
            # get the lfg message
            lfg_message = await get_lfg_message(
                client=interaction.bot,
                lfg_message_id=interaction.message.id,
                guild=interaction.guild)

            if interaction.component.label == "Join":
                res = await lfg_message.add_member(
                    member=interaction.guild.get_member(interaction.author.id))
                if res:
                    await interaction.respond(type=6)
                else:
                    await interaction.respond(
                        type=discord_components.InteractionType.
                        ChannelMessageWithSource,
                        embed=embed_message(
                            "Error",
                            "You could not be added to the event\nThis is either because you are already in the event, the event is full, or the creator has blacklisted you from their events"
                        ))

            if interaction.component.label == "Leave":
                res = await lfg_message.remove_member(
                    member=interaction.guild.get_member(interaction.author.id))
                if res:
                    await interaction.respond(type=6)
                else:
                    await interaction.respond(
                        type=discord_components.InteractionType.
                        ChannelMessageWithSource,
                        embed=embed_message(
                            "Error",
                            "You could not be removed from the event\nThis is because you are neither in the main nor in the backup roster"
                        ))

            if interaction.component.label == "Backup":
                res = await lfg_message.add_backup(
                    member=interaction.guild.get_member(interaction.author.id))
                if res:
                    await interaction.respond(type=6)
                else:
                    await interaction.respond(
                        type=discord_components.InteractionType.
                        ChannelMessageWithSource,
                        embed=embed_message(
                            "Error",
                            "You could not be added as a backup to the event\nThis is either because you are already in the backup roster, or the creator has blacklisted you from their events"
                        ))
Beispiel #8
0
    async def _mute(self, ctx: SlashContext, user, hours: int):
        await assignRolesToUser([muted_role_id], user, ctx.guild)

        status = await ctx.send(embed=embed_message(
            "Success",
            f"Muted {user.mention} for {hours} hours\nI will edit this message once the time is over"
        ))

        await asyncio.sleep(hours*60*60)
        await removeRolesFromUser([muted_role_id], user, ctx.guild)

        await status.edit(embed=embed_message(
            "Success",
            f"{user.mention} is no longer muted"
        ))
async def elevatorRegistration(message):
    if not message.guild:
        await message.author.send('Please use this command in your clans bot-channel')
        return
    state = str(message.author.id) + ':' + str(message.guild.id)
    URL = f'https://www.bungie.net/en/oauth/authorize?client_id={BUNGIE_OAUTH}&response_type=code&state={state}'
    await message.author.send(embed=embed_message(
        f'Registration',
        f'[Click here to register with me]({URL})',
        "Please be aware that I will need a while to process your data after you register for the first time, so I might react very slow to your first commands."
    ))
    await message.channel.send(embed=embed_message(
        'Registration',
        f'Sent a DM to {message.author.nick or message.author.name}'
    ))
Beispiel #10
0
async def get_destinyID_and_system(ctx: SlashContext, discord_user):
    """" takes either a discord user_id or the user obj and return user obj, destinyID and system or None """

    var_type = type(discord_user)

    if var_type == int:
        user = ctx.bot.get_user(discord_user)
    elif var_type == discord.user.User or var_type == discord.member.Member:
        user = discord_user
    else:
        return None, None, None

    destinyID = await lookupDestinyID(user.id)
    system = await lookupSystem(destinyID)

    # check if user is registered and has a valid token
    if not (destinyID and system) or not (await handleAndReturnToken(
            user.id))["result"]:
        await ctx.send(
            hidden=True,
            embed=embed_message(
                f"Error",
                f"I either possess no information about {user.display_name} or their authentication is outdated. \nPlease `/registerdesc` to fix this issue'"
            ))
        return None, None, None

    return user, destinyID, system
async def handle_persistent_message_reaction(client, payload,
                                             persistent_message):
    message_name = persistent_message[0]
    guild_id = persistent_message[1]
    channel_id = persistent_message[2]
    message_id = persistent_message[3]
    reactions_id_list = persistent_message[4]

    channel = client.get_channel(channel_id)
    message = await channel.fetch_message(message_id)

    # check if the reactions are ok, else remove them. Only do that when set reactions exist tho
    if reactions_id_list and payload.emoji.id not in reactions_id_list:
        await message.remove_reaction(payload.emoji, payload.member)
        return

    # handling depends on the type of message, so if statement incoming
    if message_name == "otherGameRoles":
        await otherGameRolesMessageReactions(client, payload.member,
                                             payload.emoji, channel_id,
                                             message_id)

    elif message_name == "clanJoinRequest":
        await clanJoinRequestMessageReactions(client, payload.member,
                                              payload.emoji, channel_id,
                                              message_id)

    # only allow registered users to participate
    elif message_name == "tournament":
        if not (await handleAndReturnToken(payload.member.id))["result"]:
            await message.remove_reaction(payload.emoji, payload.member)
            await payload.member.send(embed=embed_message(
                "Error",
                "You need to register first before you can join a tournament. \nTo do that please use `/registerdesc` in <#670401854496309268>"
            ))
Beispiel #12
0
    async def _website(self, ctx: SlashContext, website, **kwargs):
        user = await get_user_obj(ctx, kwargs)
        _, destinyID, system = await get_destinyID_and_system(ctx, user)
        if not destinyID:
            return

        # get the text
        text = ""
        if website == "Solo Report":
            text = f'https://elevatorbot.ch/soloreport/{system}/{destinyID}'
        elif website == "Expunge Report":
            text = f'https://elevatorbot.ch/expungereport/{self.rrsystem[system]}/{destinyID}'
        elif website == "Raid Report":
            text = f'https://raid.report/{self.rrsystem[system]}/{destinyID}'
        elif website == "Dungeon Report":
            text = f'https://dungeon.report/{self.rrsystem[system]}/{destinyID}'
        elif website == "Grandmaster Report":
            text = f'https://grandmaster.report/user/{system}/{destinyID}'
        elif website == "Nightfall Report":
            text = f'https://nightfall.report/guardian/{system}/{destinyID}'
        elif website == "Trials Report":
            text = f'https://destinytrialsreport.com/report/{system}/{destinyID}'
        elif website == "Triumph Report":
            text = f'https://triumph.report/{system}/{destinyID}'
        elif website == "Braytech.org":
            text = f'https://braytech.org/{system}/{destinyID}'
        elif website == "D2 Checklist":
            text = f'https://www.d2checklist.com/{system}/{destinyID}'
        elif website == "Destiny Tracker":
            text = f'https://destinytracker.com/destiny-2/profile/{system}/{destinyID}'
        elif website == "Wasted on Destiny":
            text = f'https://wastedondestiny.com/{system}_{destinyID}'

        await ctx.send(embed=embed_message(website, text))
Beispiel #13
0
    async def _getUserMatching(self, ctx: SlashContext):
        await ctx.send(hidden=True, embed=embed_message(
            "Please wait...",
            "The results will be here in a second"
        ))

        clanmap = await getNameAndCrossaveNameToHashMapByClanid(CLANID)
        successfulMatches = []
        unsuccessfulMatches = []
        for userid, (steamname, crosssavename) in clanmap.items():
            discordID = await lookupDiscordID(int(userid))
            if discordID:
                # user could be matched
                guy = self.client.get_user(discordID)
                if guy:
                    successfulMatches.append((steamname, crosssavename, guy.name))
                else:
                    await ctx.channel.send(f'[ERROR] {steamname}/{crosssavename} with destinyID {userid} has discordID {discordID} but it is faulty')
            else:
                # user not found
                unsuccessfulMatches.append((steamname, crosssavename, userid))

        await ctx.channel.send('SUCCESSFUL MATCHES:')
        sortedSuccessfulMatches = sorted(successfulMatches, key=lambda pair: pair[2].lower())
        successfulMessage = ''
        for (steamname, crosssavename, username) in sortedSuccessfulMatches:
            successfulMessage += f'{username:<30} - {steamname} / {crosssavename}\n'

        if len(successfulMessage) < 2000:
            await ctx.channel.send(successfulMessage)
        else:
            remainingMessage = successfulMessage
            while curMessage := remainingMessage[:1900]:
                await ctx.channel.send(curMessage)
                remainingMessage = remainingMessage[1900:]
Beispiel #14
0
async def handle_command(command, params, message, client):
    # Check whether the command is supported, stop silently if it's not
    # (to prevent unnecesary spam if our bot shares the same command prefix
    # with some other bot)
    COMMAND_HANDLERS = {
        c.__name__.lower(): c()
        for c in BaseCommand.__subclasses__()
    }

    if command not in COMMAND_HANDLERS:
        return

    print(f"{message.author.name}: {COMMAND_PREFIX}{command} " +
          " ".join(params))

    # tell them to use / commands
    await message.reply(
        "Did you know we have slash commands now? Please use those, normal commands might not work anymore. \nType `/` to see a list of commands"
    )

    # log the command - <discordID,command,arg1 arg2>
    logger = logging.getLogger('commands')
    logger.info(f"""<{message.author.id},{command},{" ".join(params)}>""")

    # check if user is registered, otherwise command will be blocked and he will be informed
    # ignore that check if message is !register or !registerdesc
    if message.guild and message.guild.id == 669293365900214293:
        if (command != "register") and (command != "registerdesc"):
            if not await getToken(message.author.id):
                await message.reply(embed=embed_message(
                    'Additional Action Necessary',
                    f'{message.author.name}, please first link your Destiny account by using `!register`'
                ))
                return

    # set mentioned_user params[-1] and if that is not valid to message.author
    mentioned_user = message.author
    if len(params) > 0:
        ctx = await client.get_context(message)
        try:
            temp = await MemberConverter().convert(ctx, params[-1])
            mentioned_user = temp
            params = params[:-1]
        except MemberNotFound:
            pass
            #print(f"Tried to convert last parameter '{params[-1]}' to mentioned_user and failed")

    # Retrieve the command
    cmd_obj = COMMAND_HANDLERS[command]
    relevant_params = []
    for param in cmd_obj.params:
        if not param.startswith("*"):
            relevant_params.append(param)
    if (cmd_obj.params and len(params) < len(relevant_params)
        ) or command.lower() == "help" or (params and 'help' in params):
        # show help msg
        await show_help(message, command, cmd_obj.params)
    else:
        await cmd_obj.handle(params, message, mentioned_user, client)
Beispiel #15
0
    async def handle(self, params, message, mentioned_user, client):
        text = getSteamJoinID(mentioned_user.id)
        if not text:
            text = "Nothing found. Please tell the user to set the code with \n`!setID <code>`\nYou can find your own code by typing `/id` in-game\n⁣\nSadly I do not have access to this information, since it is handled by Steam and not Bungie"

        embed = embed_message(f"{mentioned_user.name}'s Steam Join Code",
                              f"/join {text}")
        await message.reply(embed=embed)
Beispiel #16
0
    async def handle(self, params, message, mentioned_user, client):
        given_role = " ".join(params)

        f_year = ""
        f_role = ""
        found = False
        for topic, roles in requirementHashes.items():
            if found:
                break
            else:
                for role, roledata in roles.items():
                    if given_role.lower() == role.lower():
                        found = True
                        f_year = topic
                        f_role = role
                        break

        if not found:
            await message.channel.send(embed=embed_message(
                'Error',
                f"I don't know that role, please make sure it's spelled correctly!"
            ))
            return

        #Get user details and run analysis
        async with message.channel.typing():
            destinyID = lookupDestinyID(mentioned_user.id)
            wait_msg = await message.channel.send(
                embed=embed_message(f'Hi, {mentioned_user.display_name}',
                                    "Your data will be available shortly"))

            await updateDB(destinyID)
            reqs = await hasRole(destinyID, f_role, f_year, br=False)

            print(reqs[1])

            embed = embed_message(
                f"{mentioned_user.display_name}'s '{f_role}' Eligibility")

            for req in reqs[1]:
                embed.add_field(name=req, value=reqs[1][req], inline=True)

            await wait_msg.delete()
            await message.channel.send(embed=embed,
                                       reference=message,
                                       mention_author=True)
    async def _roles_requirements(self, ctx: SlashContext, **kwargs):
        user = await get_user_obj(ctx, kwargs)

        # might take a sec
        await ctx.defer()

        # search for the role in our role dict
        given_role = kwargs["role"].name
        f_year = ""
        f_role = ""
        found = False
        for topic, roles in requirementHashes.items():
            if found:
                break
            else:
                for role, roledata in roles.items():
                    if given_role.lower() == role.lower():
                        found = True
                        f_year = topic
                        f_role = role
                        break

        if not found:
            await ctx.send(
                hidden=True,
                embed=embed_message(
                    f"Error",
                    f"This role can't be achieved through Destiny 2 \nPlease try again with a different role"
                ))
            return

        # Get user details
        _, destinyID, system = await get_destinyID_and_system(ctx, user)

        # update user DB
        await updateDB(destinyID)
        reqs = await hasRole(destinyID, f_role, f_year, br=False)

        # construct reply msg
        embed = embed_message(f"{user.display_name}'s '{f_role}' Eligibility")

        for req in reqs[1]:
            embed.add_field(name=req, value=reqs[1][req], inline=True)

        await ctx.send(embed=embed)
    async def _unregisterdesc(self, ctx: SlashContext, **kwargs):
        user = await get_user_obj_admin(ctx, kwargs)
        if not user:
            return

        await removeUser(user.id)
        await ctx.send(hidden=True,
                       embed=embed_message(f"Sucess",
                                           f"Removed {user.display_name}"))
Beispiel #19
0
async def checkIfUserIsRegistered(user):
    if (await handleAndReturnToken(user.id))["result"]:
        return True
    else:
        print(f"{user.display_name} is not registered")
        embed = embed_message(
            "Error",
            "Please register with `/registerdesc` first (not via DMs)")
        await user.send(embed=embed)
        return False
    async def _kick(self, ctx: SlashContext, lfg_id, user):
        # get the message obj
        lfg_message = await get_lfg_message(ctx.bot, lfg_id, ctx)
        if not lfg_message:
            return

        if await lfg_message.remove_member(user):
            await ctx.send(
                hidden=True,
                embed=embed_message(
                    "Success",
                    f"{user.display_name} has been removed from the LFG post with the id `{lfg_id}`"
                ))
        else:
            await ctx.send(
                hidden=True,
                embed=embed_message(
                    "Error",
                    f"{user.display_name} could not be remove from the LFG post with the id `{lfg_id}`, because they are not in it"
                ))
    async def _add(self, ctx: SlashContext, lfg_id, user):
        # get the message obj
        lfg_message = await get_lfg_message(ctx.bot, lfg_id, ctx)
        if not lfg_message:
            return

        if await lfg_message.add_member(user):
            await ctx.send(
                hidden=True,
                embed=embed_message(
                    "Success",
                    f"{user.display_name} has been added to the LFG post with the id `{lfg_id}`"
                ))
        else:
            await ctx.send(
                hidden=True,
                embed=embed_message(
                    "Error",
                    f"{user.display_name} could not be added to the LFG post with the id `{lfg_id}`, because they are already in it or they are blacklisted by the creator"
                ))
Beispiel #22
0
        async def message_user(client, discordID, vendor_name, item_definition, stats, total_stats):
            embed = embed_message(
                f"{vendor_name} is selling {item_definition[2]}",
                f"**Class:** {class_types[item_definition[3]]}\n**Slot:** {(await getDestinyDefinition('DestinyInventoryBucketDefinition', item_definition[4]))[2]}\n**Total Stats:** {total_stats}"
            )
            for stat_name, statID in stat_names.items():
                embed.add_field(name=stat_name, value=f"Total: {stats[statID]['value']}", inline=True)

            # send that to user
            user = client.get_user(discordID)
            if user:
                await user.send(embed=embed)
    async def _get(self, ctx: SlashContext, **kwargs):
        user = await get_user_obj(ctx, kwargs)

        text = await getSteamJoinID(user.id)
        if not text:
            text = "Nothing found. Please tell the user to set the code with \n`/id set <code>`\nYou can find your own code by typing `/id` in-game\n⁣\nSadly I do not have access to this information, since it is handled by Steam and not Bungie"
        else:
            text = f"/join {text}"

        embed = embed_message(f"{user.display_name}'s Steam Join Code",
                              f"{text}")
        await ctx.send(embed=embed)
    async def _remove(self, ctx: SlashContext, lfg_id):
        # get the message obj
        lfg_message = await get_lfg_message(ctx.bot, lfg_id, ctx)
        if not lfg_message:
            return

        await lfg_message.delete()
        await ctx.send(
            hidden=True,
            embed=embed_message(
                "Success",
                f"The LFG post with the id `{lfg_id}` has been deleted"))
Beispiel #25
0
async def verify_time_input(ctx, input):
    """ Verifies that the user input is a valid time and returns the datetime obj. Else returns False """

    # make sure the times are valid
    try:
        return datetime.datetime.strptime(input, "%d/%m/%y")
    except ValueError:
        await ctx.send(
            hidden=True,
            embed=embed_message(
                f"Error",
                f"The time parameters must be in this format - `DD/MM/YY`"))
        return False
Beispiel #26
0
async def hasMentionPermission(message, user, additional_users=None):
    if additional_users is None:
        additional_users = []

    # if no other user is mentioned its ok anyways
    if user.id not in [message.author.id, *additional_users]:
        if not await hasAdminOrDevPermissions(message):
            await message.channel.send(embed=embed_message(
                'Error',
                'You are not allowed to use this command for a different user here, please try again`'
            ))
            return False
    return True
Beispiel #27
0
    async def _boosters(self, ctx: SlashContext):
        sorted_premium_subscribers = sorted(ctx.guild.premium_subscribers,
                                            key=lambda m: m.premium_since,
                                            reverse=True)

        embed = embed_message(
            f"{ctx.guild.name} Nitro Boosters", ",\n".join([
                '**' + f"{m.display_name:<30}" + "** since: " +
                m.premium_since.strftime('%d/%m/%Y, %H:%M')
                for m in sorted_premium_subscribers
            ]))

        await ctx.send(embed=embed)
Beispiel #28
0
async def show_help(message, command, params):
    # work some magic that msg looks nice
    nice_looking_params = []
    for param in params:
        if param.startswith("*"):
            nice_looking_params.append(f"{param[:1]}<{param[1:]}>")
        else:
            nice_looking_params.append(f"<{param}>")

    await message.reply(embed=embed_message(
        "Incorrect Parameters",
        f"Correct usage is:\n`{COMMAND_PREFIX}{command} {' '.join(nice_looking_params)} *<user>`",
        "Info: The <user> parameter doesn't work for every command"))
Beispiel #29
0
    async def _funfact(self, ctx: SlashContext):
        await ctx.defer()

        url = "https://uselessfacts.jsph.pl/random.json?language=en"

        async with aiohttp.ClientSession() as session:
            async with session.get(url=url) as r:
                if r.status == 200:
                    text = (await r.json())["text"]
                else:
                    text = "Offline servers make it difficult to get fun facts :("

                await ctx.send(embed=embed_message('Did you know?', text))
Beispiel #30
0
async def removeFromClanAfterLeftDiscord(client, member):
    # wait 10 mins bc bungie takes forever in updating the clan roster
    await asyncio.sleep(10 * 60)

    # check if user was in clan
    destinyID = await lookupDestinyID(member.id)
    found = False
    for clan_member in (await getJSONfromURL(f"https://www.bungie.net/Platform/GroupV2/{CLANID}/Members/"))["Response"]["results"]:
        clan_memberID = int(clan_member["destinyUserInfo"]["membershipId"])
        if clan_memberID == destinyID:
            found = True
            break

    if not found:
        print(f"{member.display_name} has left discord, but wasn't in the clan")
        return

    # promts in newtonslab, if yes is pressed he is removed
    newtonslab = client.get_channel(BOTDEVCHANNELID)
    yes = client.get_emoji(thumps_up_emoji_id)
    no = client.get_emoji(thumps_down_emoji_id)

    embed = embed_message(
        "Clan Update",
        f"{member.display_name} with discordID <{member.id}> and destinyID <{destinyID}> has left the Discord but is still in the clan. \nKick him?"
    )
    message = await newtonslab.send(embed=embed)
    await message.add_reaction(yes)
    await message.add_reaction(no)

    # check that the reaction user was not a bot, used "yes" or "no" reaction and reacted to the correct message
    def check(reaction_reaction, reaction_user):
        return (not reaction_user.bot) and (reaction_reaction.emoji == yes or reaction_reaction.emoji == no) and (reaction_reaction.message.id == message.id)
    reaction, _ = await client.wait_for('reaction_add', check=check)

    # if yes is pressed he is removed (using kigstn's id / token since he is an admin and not the owner for some safety)
    if reaction.emoji == yes:
        membershipType = await lookupSystem(destinyID)
        postURL = f'https://www.bungie.net/Platform/GroupV2/{CLANID}/Members/{membershipType}/{destinyID}/Kick/'
        data = {}
        #Kigstns discord ID
        ret = await postJSONtoBungie(postURL, data, 238388130581839872)

        if ret["error"] is None:
            text = "Successfully removed!"
        else:
            text = ret["error"]
    else:
        text = "Aborted"

    await newtonslab.send(text)