aboutsummaryrefslogtreecommitdiff
path: root/cogs
diff options
context:
space:
mode:
authorLuca Matei Pintilie <luca@lucamatei.com>2024-12-08 13:19:55 +0000
committerLuca Matei Pintilie <luca@lucamatei.com>2024-12-08 13:20:50 +0000
commit2c44c378eb2717bdb5b6a5de7628d8dfb4835036 (patch)
tree069dd0b0ad582c558e4f7268742660e3791f5de6 /cogs
parent4b8a3c7027fb360c62874cda6b871f522c773c99 (diff)
downloadsteve-bot-2c44c378eb2717bdb5b6a5de7628d8dfb4835036.tar
steve-bot-2c44c378eb2717bdb5b6a5de7628d8dfb4835036.tar.gz
steve-bot-2c44c378eb2717bdb5b6a5de7628d8dfb4835036.tar.bz2
steve-bot-2c44c378eb2717bdb5b6a5de7628d8dfb4835036.tar.lz
steve-bot-2c44c378eb2717bdb5b6a5de7628d8dfb4835036.tar.xz
steve-bot-2c44c378eb2717bdb5b6a5de7628d8dfb4835036.tar.zst
steve-bot-2c44c378eb2717bdb5b6a5de7628d8dfb4835036.zip
util: add findblock command
Diffstat (limited to '')
-rwxr-xr-xcogs/utils.py22
1 files changed, 22 insertions, 0 deletions
diff --git a/cogs/utils.py b/cogs/utils.py
index 02c17f3..d798f30 100755
--- a/cogs/utils.py
+++ b/cogs/utils.py
@@ -96,6 +96,13 @@ class Utils(commands.Cog):
self.bot = bot
self.tries = 1
self.pins = []
+ self.block_stats = []
+
+ with open("./required_block_states.json") as file:
+ required_block_states = json.load(file)
+ for block, states in required_block_states["minecraft"].items():
+ for s in states:
+ self.block_stats.append(block)
@commands.command(
description="Pong!",
@@ -107,6 +114,21 @@ class Utils(commands.Cog):
@commands.cooldown(1, 25, commands.BucketType.guild)
@commands.command()
+ async def findblock(self, ctx):
+ """Simulate the UGBC experience"""
+ if ctx.message.channel.id != int(
+ self.bot.config[str(ctx.message.guild.id)]["bot_channel"]
+ ):
+ await ctx.message.delete()
+ ctx.command.reset_cooldown(ctx)
+ return
+
+ await ctx.send(
+ f"{discord.utils.escape_mentions(ctx.message.author.display_name)} -> your block is a {choice(self.block_stats)}."
+ )
+
+ @commands.cooldown(1, 25, commands.BucketType.guild)
+ @commands.command()
async def findseed(self, ctx):
"""Test your luck"""
if ctx.message.channel.id != int(