Skip to content

Commit

Permalink
Fixed f-string bug
Browse files Browse the repository at this point in the history
  • Loading branch information
SpectrixDev committed Mar 23, 2022
1 parent 547e0f9 commit a6b1881
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions phoneBot.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
""" For setup instructions, read the README.md
By Spectrix#0001. Enjoy """
"""
For setup instructions, read the README.md
By Spectrix. Enjoy
https://spectrixdev.github.io/
"""

import discord, asyncio, aiohttp, json
from discord.ext import commands
Expand All @@ -12,7 +15,7 @@

@bot.event
async def on_ready():
print("=========\nReady for use!\n=========\nBot created by Spectrix#0001! hf <3")
print("=========\nReady for use!\n=========\nBot created by Spectrix#7745! hf <3")

@commands.cooldown(1, int(config["callCoolDown"]), BucketType.user)
@bot.command()
Expand All @@ -22,7 +25,7 @@ async def call(ctx, *, message):
report["value1"] = f"New message. {message}"
report["value2"] = f". Sent by {ctx.author.name} on the server {ctx.guild.name}."
async with aiohttp.ClientSession() as session:
await session.post(f"https://maker.ifttt.com/trigger/{config["eventName"]}/with/key/{config["IFTTTkey"]}", data=report)
await session.post(f"https://maker.ifttt.com/trigger/{config['eventName']}/with/key/{config['IFTTTkey']}", data=report)
await ctx.send("**Data posted! Calling the bot owner now :telephone_receiver:**")
else:
await ctx.send(f"**{ctx.author.mention} You can't send messages over 250 chars long. :no_entry:**")
Expand All @@ -33,5 +36,4 @@ async def on_command_error(ctx, error):
await ctx.send(f"**:no_entry: {error}**")

if __name__ == '__main__':

bot.run(config["discordToken"])

0 comments on commit a6b1881

Please sign in to comment.