def _setsteamid(self, ctx: commands.Context, steamID: str):
"""Associates your Discord account to the Steam profile
with the given ID.
You MUST provide your text ID, which has the form 'STEAM_X:X:XXXXXX'.
You can use http://steamidfinder.com/ to get it.
"""
if re.compile(r"STEAM_\d:\d:\d+").match(steamID) is None:
await self.bot.reply(cf.error(
"Provided Steam ID does not seem to be in the correct format. "
"You need to provide the ID of the form 'STEAM_X:X:XXXXXX'. "
"You can use http://steamidfinder.com/ to get it."))
return
server = ctx.message.server
self.settings[server.id]["steam_ids"][steamID.split(":")[-1]] = ctx.message.author.id
dataIO.save_json(self.settings_path, self.settings)
await self.bot.reply(cf.info("Steam ID set."))
评论列表
文章目录