Comments (6)
It can be easily done; the problem is that I can update the repository now since I've got no midjourney subscription to test changes in code.
from midjourney-wrapper.
Any hints on how to achieve it? I can try to test and make a PR.
from midjourney-wrapper.
from midjourney-wrapper.
是的,要是有根据用户组设置就更好了😆
from midjourney-wrapper.
根据用户组没看到文档,你可以为每个用户添加限制:@commands.cooldown(1, 120, commands.BucketType.user)
from midjourney-wrapper.
根据用户组没看到文档,你可以为每个用户添加限制:@commands.cooldown(1, 120, commands.BucketType.user)
感谢指路。我又参考了一些公开代码,为单个指令增加了@commands.cooldown,并在代码末尾增加了触发cooldown的处理:
@bot.event
async def on_application_command_error(ctx: discord.ApplicationContext, error: discord.DiscordException):
if isinstance(error, commands.CommandOnCooldown):
await ctx.respond("This command is currently on cooldown!")
else:
raise error
得到的效果是成功设置了限制,机器人会在公屏打出频率受限的提示语句(想要你那种只给发指令的人提示),后台出现“discord.errors.HTTPException: 405 Method Not Allowed”的报错但没有影响运行。
总之效果差强人意,可以麻烦你po一下你的改法吗?外行爱好者,问了外行话见谅!
from midjourney-wrapper.
Related Issues (20)
- What does `"MJ::JOB::upsample_max::1::{}::SOLO".format(messageHash)` mean ? HOT 1
- What the expiration of the SALAI_TOKEN? HOT 1
- Would Like to help add more commands like /my_info HOT 2
- DAVINCI_TOKEN is not defined HOT 2
- 405 method not allowed HOT 2
- I suddenly can't use the ‘/mj_variation’ command, everything else is fine HOT 6
- Is there an API? HOT 3
- use /mj_upscale_to_max got an error message
- How to monitor Midjourney Bot error prompts HOT 3
- I wish to add more channel ! HOT 1
- New MJ captcha HOT 2
- MJ Share
- Question about discord interactions
- bot is not working for me anymore HOT 3
- I get an error entering the correct server and channel data in Globals.py .
- The application did not respond
- INTERACTION_APPLICATIO N_COMMAND_INVALID_VERSION HOT 4
- issue with discord api HOT 9
- $mj_target doesnt work. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from midjourney-wrapper.