Use reply instead of send
This commit is contained in:
parent
9b64fa14fb
commit
ad1919a249
1 changed files with 10 additions and 10 deletions
20
main.py
20
main.py
|
@ -62,11 +62,11 @@ async def state(ctx):
|
|||
msg = await mqtt_get_one("bitlair/state")
|
||||
space_state = msg.payload.decode("ascii")
|
||||
if space_state == "open":
|
||||
await ctx.send("Bitlair is OPEN! :sunglasses:")
|
||||
await ctx.reply("Bitlair is OPEN! :sunglasses:")
|
||||
elif space_state == "closed":
|
||||
await ctx.send("Bitlair is closed :pensive:")
|
||||
await ctx.reply("Bitlair is closed :pensive:")
|
||||
except Exception as err:
|
||||
await ctx.send("Meh, stuk")
|
||||
await ctx.reply("Meh, stuk")
|
||||
raise err
|
||||
|
||||
|
||||
|
@ -76,9 +76,9 @@ async def co2(ctx, where='hoofdruimte'):
|
|||
async with ctx.typing():
|
||||
try:
|
||||
msg = await mqtt_get_one(f"bitlair/climate/{where}/co2_ppm")
|
||||
await ctx.send(f"{where}: {msg.payload.decode('ascii')} ppm\n")
|
||||
await ctx.reply(f"{where}: {msg.payload.decode('ascii')} ppm\n")
|
||||
except Exception as err:
|
||||
await ctx.send("Meh, stuk")
|
||||
await ctx.reply("Meh, stuk")
|
||||
raise err
|
||||
|
||||
|
||||
|
@ -88,9 +88,9 @@ async def temp(ctx, where="hoofdruimte"):
|
|||
async with ctx.typing():
|
||||
try:
|
||||
msg = await mqtt_get_one(f"bitlair/climate/{where}/temperature_c")
|
||||
await ctx.send(f"{where}: {msg.payload.decode('ascii')} °C\n")
|
||||
await ctx.reply(f"{where}: {msg.payload.decode('ascii')} °C\n")
|
||||
except Exception as err:
|
||||
await ctx.send("Meh, stuk")
|
||||
await ctx.reply("Meh, stuk")
|
||||
raise err
|
||||
|
||||
|
||||
|
@ -100,9 +100,9 @@ async def humid(ctx, where="hoofdruimte"):
|
|||
async with ctx.typing():
|
||||
try:
|
||||
msg = await mqtt_get_one(f"bitlair/climate/{where}/humidity_pct")
|
||||
await ctx.send(f"{where}: {msg.payload.decode('ascii')} pct\n")
|
||||
await ctx.reply(f"{where}: {msg.payload.decode('ascii')} pct\n")
|
||||
except Exception as err:
|
||||
await ctx.send("Meh, stuk")
|
||||
await ctx.reply("Meh, stuk")
|
||||
raise err
|
||||
|
||||
|
||||
|
@ -110,7 +110,7 @@ async def humid(ctx, where="hoofdruimte"):
|
|||
@HobbyBot.command(description="Now Playing")
|
||||
async def np(ctx):
|
||||
async with ctx.typing():
|
||||
await ctx.send("Now playing: Darude - Sandstorm")
|
||||
await ctx.reply("Now playing: Darude - Sandstorm")
|
||||
|
||||
|
||||
# !bottleclip
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue