考虑用动归,数组dp[i][j]表示用i个骰子扔出和为j的可能数,因为第i个骰子可能扔出1-6的点数,...
我需要我的机器人来选择一个随机的响应(例如,1/10),当我使用像!roll或!dice这样的命令时,一旦使用了,用户就会冷却6天(也就是说,该命令之后6天内不能被用户使用,并且会用天、小时和分钟来响应)。我对代码很陌生,但我想出了一些const Bot = new Discord.Client(); const to 浏览2提问于2019-02-12得票数...
Rolisteam Dice Parser run dice commands. It is available on several platforms. The syntax is simple and powerful. Full documentation here Invite to Your Discord Server Features 99.9%uptime Roll any kind of dice Customizable prefix Custom alias/macro to improve game experience ...
command(pass_context=True) async def dice(self, ctx, *, msg="1"): """Roll dice. Optionally input # of dice and # of sides. Ex: [p]dice 5 12""" await ctx.message.delete() invalid = 'Invalid syntax. Ex: `>dice 4` - roll four normal dice. `>dice 4 12` - roll four 12...
@bot.command()asyncdefgreet(ctx):awaitctx.send(f'Hello,{ctx.author.name}!')@bot.command()asyncdefroll(ctx,dice:str):rolls,limit=map(int,dice.split('d'))result=', '.join(str(random.randint(1,limit))forrinrange(rolls))awaitctx.send(result) ...
Speak/Say command View settings and configuration Role giving/taking Message pruning Kick/Ban or Softban users Permission level viewer Strawpoll Generator Fun commands like image search, dice roll, 8Ball, Random jokes, and quotes, etc Global Stats and Specific Stats ...
CommandDescriptionExampleAliases t!image <subreddit> [–nsfw] [–day | –week | –month | –year | –all]Get a random image from Imgur.t!image awwnime --montht!imgur t!dice [(rolls)d(sides)]Roll a dice with 6 sides or as specified.t!dice ...
问题出在你的modifier上。你当前的正则表达式与你命令*1d20+1d30中的+1匹配,因为它并不关心+1后面...
dice bots typically have the flexibility of specifying either a maximum number you want to roll up to (i.e. !roll 100 – gives you a random number between 1 and 100), or actually specifying the number of dice and sides per die (i.e. !roll 2d6 – will roll two dice with 6 sides...
2 Using Discord's Roll20 Integration Roll20 is a dynamic platform for online tabletop gaming that makes the experience so, so much better. It features digital character sheets, maps, and integrated dice rollers catered pretty much to whatever tabletop game you want to play. I often use it ...