python - 我想让这段代码只针对一个角色,我该怎么做?
问题描述
with open('database.txt') as file:
file = file.read().split()
@client.event
async def on_message(message):
for database in file:
if database in message.content.lower():
await message.channel.send(f'{message.author.mention}**! Daha hızlı banlanması için <@854087258990444564> Botuna DM At** !')
我想让这段代码只针对一个角色,我该怎么做?
解决方案
推荐阅读
- javascript - 使用 Tampermonkey 即时交换外国网站 Css
- c# - OPC UA 服务器 - 字符串节点 ID 创建
- webpack - Webpack 4. 将 'mode' 选项设置为 'development' 或 'production' 以启用此环境的默认值
- node.js - 如何使用基于关联的 sequalize(nodeJs) 从 mysql 中查找数据?
- integration-testing - Jest 集成测试 - 如何管理全局上下文?
- javascript - 区分对象如何定义为键
- git - 如何将git文件夹从以前的更改为新的?
- reactjs - 为子文件夹声明模块
- excel - 指定 Windows 用户名 tu 一次取消保护所有工作表
- javascript - 我的 php 变量没有得到 jquery 的值,为什么?