Add command to add steam ids to users
This commit is contained in:
parent
9a37bb53a9
commit
cf18488283
@ -408,6 +408,20 @@ class Rcon(commands.Cog):
|
||||
|
||||
else:
|
||||
await ctx.send('I need a list of members to whitelist.')
|
||||
|
||||
@commands.command(name="add_steamid", aliases=['steamid'])
|
||||
@checks.is_moderator()
|
||||
async def _add_steam_id_to_user(self, ctx, member: discord.Member, steam_id: int):
|
||||
if isinstance(member, discord.Member):
|
||||
resp = await self.bot.aio_session.patch(f'{self.bot.api_base}/users/{member.id}/',
|
||||
headers=self.bot.auth_header,
|
||||
json={'steam_id': steam_id})
|
||||
if resp.status == 200:
|
||||
await ctx.message.add_reaction(self.bot.success_emoji)
|
||||
return
|
||||
await ctx.send('I couldn\'t update that user for some reason.')
|
||||
return
|
||||
await ctx.send('Are you sure that is a valid user?')
|
||||
#
|
||||
# @commands.command(name='new_patron')
|
||||
# @commands.guild_only()
|
||||
|
||||
@ -39,7 +39,7 @@ class Geeksbot(commands.Bot):
|
||||
self.git_url = 'https://github.com/dustinpianalto/geeksbot_v2'
|
||||
self.load_default_extensions()
|
||||
self.owner_id = 351794468870946827
|
||||
|
||||
self.success_emoji = '\N{WHITE CHECK MARK}'
|
||||
self.book_emojis = {
|
||||
'unlock': '🔓',
|
||||
'start': '⏮',
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user