From 0ecf7c738a411b7a2d4487259df58eb701915803 Mon Sep 17 00:00:00 2001 From: dnutiu Date: Mon, 22 Jan 2024 21:36:59 +0200 Subject: [PATCH] implement $roll command --- config.yaml | 2 ++ docs/bot_dice_roll.png | Bin 0 -> 40894 bytes readme.md | 4 ++++ src/bot/__init__.py | 0 src/bot/discord/__init__.py | 0 src/bot/discord/bot.py | 22 ++++++++++++++++++++++ src/bot/discord/commands/__init__.py | 0 src/bot/discord/commands/dice.py | 26 ++++++++++++++++++++++++++ src/config/__init__.py | 0 src/dice/dice.py | 2 +- src/dice/parser.py | 4 ++++ src/main.py | 9 ++++++++- 12 files changed, 67 insertions(+), 2 deletions(-) create mode 100644 config.yaml create mode 100644 docs/bot_dice_roll.png create mode 100644 src/bot/__init__.py create mode 100644 src/bot/discord/__init__.py create mode 100644 src/bot/discord/bot.py create mode 100644 src/bot/discord/commands/__init__.py create mode 100644 src/bot/discord/commands/dice.py create mode 100644 src/config/__init__.py diff --git a/config.yaml b/config.yaml new file mode 100644 index 0000000..d7c0b61 --- /dev/null +++ b/config.yaml @@ -0,0 +1,2 @@ +discord: + token: \ No newline at end of file diff --git a/docs/bot_dice_roll.png b/docs/bot_dice_roll.png new file mode 100644 index 0000000000000000000000000000000000000000..002232ab97a45dd75a8ea25552a87780a506b3c9 GIT binary patch literal 40894 zcmdSAg;QM7vo#taK!Rm(cXxLQFfhRx+zIaP9)b-Xf_s4A4k5Vv1b26Lw?W?IcklPU z`>NhQaHoozf#RI$-MhO__gZU*D=UJ~J`jF*_39Ox%x9p=t5syCq|C)RCI={&EUC*}&8bYc`7-Lfc zOnM2?`tZd}*u=$ug_8pq7{8IL+nz4NhF)=5APRAYv)PEq?F?CcKdpf2`kV?p8d@+B zwJ;C~g=y>>okE63D(H{4pA80F23<-jC4oSo>4#?}61_@EzaKMO%fo=fOue{;+GKId z)(Bx~Ql`-yQ8oYo5XZoAPd~XmyG&pdQ!#fqfrYp1O#uRG213|m{MqUUZ?{C94X@AP zw*wX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ry (We don't do that here) - ❌ Paid Content. +### Screenshots + +![./docs/bot_dice_roll.png](./docs/bot_dice_roll.png) + Made with 💞 by [nuculabs.dev](https://blog.nuculabs.dev) diff --git a/src/bot/__init__.py b/src/bot/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/src/bot/discord/__init__.py b/src/bot/discord/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/src/bot/discord/bot.py b/src/bot/discord/bot.py new file mode 100644 index 0000000..227cddb --- /dev/null +++ b/src/bot/discord/bot.py @@ -0,0 +1,22 @@ +import logging + +import disnake +from disnake.ext.commands import bot + +from src.bot.discord.commands.dice import DiceCog + + +class NucuBot(bot.Bot): + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) + self._logger = logging.getLogger(__name__) + + @staticmethod + def create() -> "NucuBot": + intents = disnake.Intents.all() + discord_bot = NucuBot(intents=intents, command_prefix="$") + discord_bot.add_cog(DiceCog(discord_bot)) + return discord_bot + + async def on_ready(self): + self._logger.info(f"Logged on as {self.user}!") diff --git a/src/bot/discord/commands/__init__.py b/src/bot/discord/commands/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/src/bot/discord/commands/dice.py b/src/bot/discord/commands/dice.py new file mode 100644 index 0000000..acada8e --- /dev/null +++ b/src/bot/discord/commands/dice.py @@ -0,0 +1,26 @@ +from disnake.ext import commands + +from src.dice.dice import DiceRoller + + +class DiceCog(commands.Cog): + def __init__(self, bot): + self.bot = bot + + @commands.command(name="roll", aliases=["r"]) + async def roll(self, ctx, dice_expression: str): + """ + A die can be rolled using the following expression: + - 1d20 will roll a 20-faceted die and output the result a random number between 1 and 20. + - 1d100 will roll a 100 faceted die. + - 2d20 will roll a two d20 dies and multiply the result by two. + - 2d20+5 will roll a two d20 dies and multiply the result by two and ads 5. + """ + if dice_expression == "0/0": # easter eggs + return await ctx.send("What do you expect me to do, destroy the universe?") + + try: + roll_result = DiceRoller.roll(dice_expression) + await ctx.send(f"You rolled: {roll_result}") + except ValueError as e: + await ctx.send(f"Roll failed: {e}") diff --git a/src/config/__init__.py b/src/config/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/src/dice/dice.py b/src/dice/dice.py index ad3f118..037abb5 100644 --- a/src/dice/dice.py +++ b/src/dice/dice.py @@ -14,7 +14,7 @@ class DiceRoller: - 2d20+5 will roll a two d20 dies and multiply the result by two and ads 5. """ - _parser = DieParser() + _parser = DieParser.create() @staticmethod def roll(expression: str, *, advantage: typing.Optional[bool] = None) -> int: diff --git a/src/dice/parser.py b/src/dice/parser.py index a2f3fca..42ebaf8 100644 --- a/src/dice/parser.py +++ b/src/dice/parser.py @@ -31,6 +31,10 @@ class DieParser: self._semantics = DieSemantics() self._logger = logging.getLogger("DieParser") + @staticmethod + def create() -> "DieParser": + return DieParser() + def parse(self, expression: str) -> int: """ Parses the die expression and returns the result. diff --git a/src/main.py b/src/main.py index 257ee74..ee770f3 100644 --- a/src/main.py +++ b/src/main.py @@ -1,6 +1,13 @@ +import logging + +from src.bot.discord.bot import NucuBot + + def main(): - print("hello world") + bot = NucuBot.create() + bot.run("") if __name__ == "__main__": + logging.basicConfig(level=logging.INFO) main()