bot.py 文件源码

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

项目:PomodoroBot 作者: VicenteRD 项目源码 文件源码
def spoof(self, member: discord.Member, channel: discord.Channel):
        """ Spoofs a channel ID if there's a set channel to spoof from
            the one where the command was executed. Also checks for the
            author's permissions to see if they can spoof commands.

        :param member: The member trying to spoof the command.
        :type member: discord.Member

        :param channel: The channel from which the command to spoof was sent.
        :type channel: discord.Channel

        :return: If there's a registered ID to spoof and the author has elevated
            permissions, returns the spoofed ID. If not, returns the same ID
            as channel_id
        """

        if self.has_permission(member) and self.get_interface(channel).spoofed\
                is not None:
            return self._interfaces[channel].spoofed
        return channel
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号