python - discord.py 服务器模板
问题描述
所以我正在尝试创建一个创建模板的命令,代码:
@client.command()
async def template(ctx, name):
await ctx.guild.create_template(name = name, description = None)
await ctx.send('Done.')
每次使用此命令时,我都会收到此错误:
AttributeError: 'Guild' object has no attribute 'create_template'
解决方案
你把'Guild'写成'guild'
的用法
create_template
:(await discord.Guild.create_template(*, name, description=None)
只是让你知道)
推荐阅读
- javascript - How to get values of dynamic textareas in vue js?
- python - Pygame Random keystrokes
- reactjs - Render sidebar for some pages in App.js ReactJs
- json - JsonConverter.ParseJson 不能在 excel 中工作
- wireguard - 在 Ubuntu 20.04 上使用无密码的 Wireguard
- python - 如何在 scikit learn 中使用多元回归进行分类
- r - 使用 data.table x[y] 语法复制 dplyr::left_join() 列顺序
- reactjs - 使用箭头函数导出默认值
- assembly - 重写您的程序并询问任一用户是否想在汇编中继续计算(是/否)
- svg-sprite - SVG堆栈精灵没有减少发送请求的数量