retakechannels.py 文件源码

python
阅读 18 收藏 0 点赞 0 评论 0

项目:tmerc-cogs 作者: tmercswims 项目源码 文件源码
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."))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号