From 75a11c74bc4cbda644dc31c47ff1ee6c44926f16 Mon Sep 17 00:00:00 2001 From: Keanu Date: Sun, 10 May 2020 21:42:37 +0200 Subject: [PATCH 1/7] Started migrating commands. - Added requirements.txt - Added figlet command (fun) - Added 8ball command (fun) - Added shorten command (utility) - Added avatar command (utility) - Added calc command (utility) - Added purge command (utility) - Added code command (utility) - Added desc command (utility) - Added non-functional weather command (utility) --- .env_example | 3 +- .gitignore | 2 + cogs/fun.py | 19 +++++++- cogs/utility.py | 114 ++++++++++++++++++++++++++++++++++++++++++++- main.py | 1 + requirements.txt | 3 ++ storage/8ball.json | 22 +++++++++ 7 files changed, 159 insertions(+), 5 deletions(-) create mode 100644 requirements.txt create mode 100644 storage/8ball.json diff --git a/.env_example b/.env_example index 91c8786..4a9b313 100644 --- a/.env_example +++ b/.env_example @@ -1 +1,2 @@ -DISCORD_TOKEN= \ No newline at end of file +DISCORD_TOKEN= +WEATHER_TOKEN= \ No newline at end of file diff --git a/.gitignore b/.gitignore index 03bb558..eb0ca0c 100644 --- a/.gitignore +++ b/.gitignore @@ -56,6 +56,7 @@ coverage.xml *.pot # Django stuff: +*.log local_settings.py db.sqlite3 db.sqlite3-journal @@ -129,3 +130,4 @@ dmypy.json todo.txt .vscode/launch.json +storage/prefixes.json diff --git a/cogs/fun.py b/cogs/fun.py index 8e1d546..6f1886e 100644 --- a/cogs/fun.py +++ b/cogs/fun.py @@ -1,6 +1,8 @@ # Basic imports: import discord from discord.ext import commands +import json +import random # Cog class: class Fun(commands.Cog): @@ -15,9 +17,22 @@ def __init__(self, client): # print('This will be printed to the console.') # This is a command: + @commands.command(name="8ball") + async def _8ball(self, ctx): + import random + linenum = random.randint(1, 20) + user = "<@" + str(ctx.author.id) + ">" + with open('./storage/8ball.json') as responses: + response = json.load(responses) + await ctx.send(random.choice(response) + user) + + # Figlet command @commands.command() - async def ping1(self, ctx): - await ctx.send("pong nigga") + async def figlet(self, ctx, *, figtext): + from pyfiglet import Figlet + fig = Figlet() + figsend = fig.renderText(figtext) + await ctx.send(f"```{figsend}```") # This always needs to be at the end of a cog file: def setup(client): diff --git a/cogs/utility.py b/cogs/utility.py index 6fa8166..204ee81 100644 --- a/cogs/utility.py +++ b/cogs/utility.py @@ -1,6 +1,13 @@ # Basic imports: +import os import discord from discord.ext import commands +import math +import requests +import dotenv +from dotenv import load_dotenv +load_dotenv() +weathertoken = os.getenv('WEATHER_TOKEN') # Cog class: class Utility(commands.Cog): @@ -16,8 +23,111 @@ def __init__(self, client): # This is a command: @commands.command() - async def ping5(self, ctx): - await ctx.send("pong nigga") + async def shorten(self, ctx, url): + import gdshortener + s = gdshortener.ISGDShortener() + await ctx.send(s.shorten(f'{url}')) + + + # Avatar command + @commands.command() + async def avatar(self, ctx): + """Sends you your avatar.""" + avi_url = ctx.author.avatar_url + aviembed = discord.Embed(title="Avatar of " + ctx.author.name, url=avi_url) + aviembed.set_image(url=avi_url) + await ctx.send(embed=aviembed) + + + # Calc command + @commands.command() + async def calc(self, ctx, n1, op, n2=0): + """Calculate a mathematical expression. Usage: ?calc """ + SUP = str.maketrans("0123456789", "⁰¹²³⁴⁵⁶⁷⁸⁹") + if op == "+": + answer = int(n1) + int(n2) + equation = f"```{n1}{op}{n2}```" + elif op == "-": + answer = int(n1) - int(n2) + equation = f"```{n1}{op}{n2}```" + elif op == "*": + answer = int(n1) * int(n2) + equation = f"```{n1}{op}{n2}```" + elif op == "/": + answer = int(n1) / int(n2) + equation = f"```{n1}{op}{n2}```" + elif op == "!" or op == "fac": + answer = str(math.factorial(int(n1))) + equation = f'```!{n1}```' + elif op == "pow": + answer = math.pow(int(n1), int(n2)) + equation = f"```{n1}" + f"{n2}".translate(SUP) + "```" + elif op == "sqrt": + answer = math.sqrt(int(n1)) + equation = f"```√{n1}```" + else: + await ctx.send("Invalid operator!") + calcembed = discord.Embed(title="Calculator", color=0x7ac5c9) + calcembed.add_field(name="Math equation:", value=equation) + calcembed.add_field(name="Answer:", value=f"```{answer}```") + await ctx.send(embed=calcembed) + + # Clear command + @commands.command() + async def purge(self, ctx, amount=0): + """Purge a specified amount of messages. Usage: ?purge """ + if amount == 0: + await ctx.send("Please provide a number.") + else: + await ctx.channel.purge(limit=amount + 1) + + # Code command + @commands.command() + async def code(self, ctx): + await ctx.send("https://github.com/TKLprojects/travbot.py") + + # Desc command + @commands.command() + async def desc(self, ctx, *, cname): + channel = ctx.author.voice.channel + await channel.edit(name=cname) + await ctx.send(f'Changed channel name to "{cname}"') + + # Weather command + @commands.command(name="weather") + async def _weather(self, ctx, city_name): + """Get weather information about a location. Usage: ?weather """ + base_url = "http://api.weatherapi.com/v1/current.json?" + complete_url = base_url + "key=" + weathertoken + "&q=" + city_name + try: + response = requests.get(complete_url) + except BaseException: + await ctx.send("no") + res = response.json() + weather = res["current"] + location = res["location"] + condition = weather["condition"] + + current_temperature = str(int(weather["temp_c"])) + "°C" + current_pressure = str(weather["pressure_mb"])[-3:] + "mBar" + current_humidity = str(weather["humidity"]) + "%" + image = "https:" + condition["icon"] + weather_timezone = location["localtime"] + weather_location = location["name"] + weather_description = "Description: " + condition["text"] + weather_wind_kph = str(weather["wind_kph"]) + weather_wind_dir = str(weather["wind_dir"]) + + weatherembed = discord.Embed(title="Weather for " + weather_location,color=0x7ac5c9) + weatherembed.set_author(name=f"{client.user.name}",icon_url=client.user.avatar_url) + weatherembed.set_footer(text="https://weatherapi.com") + weatherembed.add_field(name="Temperature:", value=current_temperature) + weatherembed.add_field(name="Pressure:", value=current_pressure) + weatherembed.add_field(name="Humidity:", value=current_humidity) + weatherembed.add_field(name="Wind:",value=weather_wind_kph + " km/h " + weather_wind_dir) + weatherembed.add_field(name="Time:", value=weather_timezone) + weatherembed.set_thumbnail(url=image) + await ctx.send(embed=weatherembed) # This always needs to be at the end of a cog file: def setup(client): diff --git a/main.py b/main.py index 431cecd..a3c598a 100644 --- a/main.py +++ b/main.py @@ -19,6 +19,7 @@ from dotenv import load_dotenv load_dotenv() token = os.getenv('DISCORD_TOKEN') +weathertoken = os.getenv('WEATHER_TOKEN') # Server specific prefixes def get_prefix(client, message): diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..861b410 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,3 @@ +discord.py +pyfiglet +gdshortener \ No newline at end of file diff --git a/storage/8ball.json b/storage/8ball.json new file mode 100644 index 0000000..aa335de --- /dev/null +++ b/storage/8ball.json @@ -0,0 +1,22 @@ +[ + "Most likely, ", + "It is certain, ", + "It is decidedly so, ", + "Without a doubt, ", + "Definitely, ", + "You may rely on it, ", + "As I see it, yes, ", + "Outlook good, ", + "Yes, ", + "Signs point to yes, ", + "Reply hazy, try again, ", + "Ask again later, ", + "Better not tell you now, ", + "Cannot predict now, ", + "Concentrate and ask again, ", + "Don't count on it, ", + "My reply is no, ", + "My sources say no, ", + "Outlook not so good, ", + "Very doubtful, " +] \ No newline at end of file From c8389b68a51872020562f8b209721fc269937a02 Mon Sep 17 00:00:00 2001 From: Keanu Date: Thu, 14 May 2020 20:39:03 +0200 Subject: [PATCH 2/7] Finish urban command Fixes #1 --- cogs/fun.py | 37 +++++++++++++++++++++++++++++++++++++ cogs/utility.py | 1 + requirements.txt | 3 ++- 3 files changed, 40 insertions(+), 1 deletion(-) diff --git a/cogs/fun.py b/cogs/fun.py index 6f1886e..06c3d9a 100644 --- a/cogs/fun.py +++ b/cogs/fun.py @@ -3,6 +3,7 @@ from discord.ext import commands import json import random +import requests # Cog class: class Fun(commands.Cog): @@ -33,6 +34,42 @@ async def figlet(self, ctx, *, figtext): fig = Figlet() figsend = fig.renderText(figtext) await ctx.send(f"```{figsend}```") + + @commands.command() + async def urban(self, ctx, *, word): + url = "http://urbanscraper.herokuapp.com/define/" + completeurl = url + word + try: + response = requests.get(completeurl) + except: + ctx.send("Couldn't find that word.") + + res = response.json() + term = res["term"] + defi = res["definition"] + example = res["example"] + word_url = res["url"] + posttime = res["posted"] + author = res["author"] + + urbanembed = discord.Embed(title=term,url=word_url) + urbanembed.add_field(name="**Definition:**",value=defi) + urbanembed.add_field(name="**Example:**",value=example) + urbanembed.set_footer(text="Author: " + author) + await ctx.send(embed=urbanembed) + + + + @commands.command() + async def emote(self, ctx, emote): + emoji = discord.Emoji() + emoteurl = emoji.url + await ctx.send(emoteurl) + + @commands.command(hidden=True) + async def tts(self, ctx, *, message): + await ctx.send(content=message, tts=True) + # This always needs to be at the end of a cog file: def setup(client): diff --git a/cogs/utility.py b/cogs/utility.py index 204ee81..c377b2f 100644 --- a/cogs/utility.py +++ b/cogs/utility.py @@ -96,6 +96,7 @@ async def desc(self, ctx, *, cname): # Weather command @commands.command(name="weather") async def _weather(self, ctx, city_name): + # TODO #2 Fix weather command """Get weather information about a location. Usage: ?weather """ base_url = "http://api.weatherapi.com/v1/current.json?" complete_url = base_url + "key=" + weathertoken + "&q=" + city_name diff --git a/requirements.txt b/requirements.txt index 861b410..937da9e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,4 @@ discord.py pyfiglet -gdshortener \ No newline at end of file +gdshortener +urbandictionary \ No newline at end of file From 786b1339fd780b6798e0bf4e469b1d808b48e2df Mon Sep 17 00:00:00 2001 From: Keanu Date: Fri, 15 May 2020 09:35:53 +0200 Subject: [PATCH 3/7] Fix weather command Fixes #2 Co-authored-by: Zeehondie --- .gitignore | 2 ++ cogs/utility.py | 19 +++++++++---------- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/.gitignore b/.gitignore index eb0ca0c..c0f0eb9 100644 --- a/.gitignore +++ b/.gitignore @@ -131,3 +131,5 @@ dmypy.json todo.txt .vscode/launch.json storage/prefixes.json +storage/weathertoken.txt +.vscode/settings.json diff --git a/cogs/utility.py b/cogs/utility.py index c377b2f..59c2691 100644 --- a/cogs/utility.py +++ b/cogs/utility.py @@ -4,10 +4,7 @@ from discord.ext import commands import math import requests -import dotenv -from dotenv import load_dotenv -load_dotenv() -weathertoken = os.getenv('WEATHER_TOKEN') +import dotenv # Cog class: class Utility(commands.Cog): @@ -98,8 +95,10 @@ async def desc(self, ctx, *, cname): async def _weather(self, ctx, city_name): # TODO #2 Fix weather command """Get weather information about a location. Usage: ?weather """ + with open("storage/weathertoken.txt") as tokenweather: + weathertoken = tokenweather.readlines(1) base_url = "http://api.weatherapi.com/v1/current.json?" - complete_url = base_url + "key=" + weathertoken + "&q=" + city_name + complete_url = base_url + "key=f44ceda5450e4c16be585450200805" + "&q=" + str(city_name) try: response = requests.get(complete_url) except BaseException: @@ -112,15 +111,15 @@ async def _weather(self, ctx, city_name): current_temperature = str(int(weather["temp_c"])) + "°C" current_pressure = str(weather["pressure_mb"])[-3:] + "mBar" current_humidity = str(weather["humidity"]) + "%" - image = "https:" + condition["icon"] - weather_timezone = location["localtime"] - weather_location = location["name"] - weather_description = "Description: " + condition["text"] + image = "https:" + str(condition["icon"]) + weather_timezone = str(location["localtime"]) + weather_location = str(location["name"]) + weather_description = "Description: " + str(condition["text"]) weather_wind_kph = str(weather["wind_kph"]) weather_wind_dir = str(weather["wind_dir"]) weatherembed = discord.Embed(title="Weather for " + weather_location,color=0x7ac5c9) - weatherembed.set_author(name=f"{client.user.name}",icon_url=client.user.avatar_url) + weatherembed.set_author(name=f"{self.client.user.name}",icon_url=self.client.user.avatar_url) weatherembed.set_footer(text="https://weatherapi.com") weatherembed.add_field(name="Temperature:", value=current_temperature) weatherembed.add_field(name="Pressure:", value=current_pressure) From 568ed57175e35e7ecc67c2d0351b40bc3f76a251 Mon Sep 17 00:00:00 2001 From: Keanu Date: Fri, 15 May 2020 09:41:06 +0200 Subject: [PATCH 4/7] Removed todo --- cogs/utility.py | 1 - 1 file changed, 1 deletion(-) diff --git a/cogs/utility.py b/cogs/utility.py index 59c2691..a87169e 100644 --- a/cogs/utility.py +++ b/cogs/utility.py @@ -93,7 +93,6 @@ async def desc(self, ctx, *, cname): # Weather command @commands.command(name="weather") async def _weather(self, ctx, city_name): - # TODO #2 Fix weather command """Get weather information about a location. Usage: ?weather """ with open("storage/weathertoken.txt") as tokenweather: weathertoken = tokenweather.readlines(1) From fd7125c87b0ce47d41e239d6d2a71bfc29384e70 Mon Sep 17 00:00:00 2001 From: Keanu Date: Fri, 15 May 2020 10:06:22 +0200 Subject: [PATCH 5/7] Added todo for #5 --- cogs/utility.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/cogs/utility.py b/cogs/utility.py index a87169e..1a04580 100644 --- a/cogs/utility.py +++ b/cogs/utility.py @@ -21,6 +21,7 @@ def __init__(self, client): # This is a command: @commands.command() async def shorten(self, ctx, url): + """Shortens a URL. Usage: ?shorten """ import gdshortener s = gdshortener.ISGDShortener() await ctx.send(s.shorten(f'{url}')) @@ -81,11 +82,13 @@ async def purge(self, ctx, amount=0): # Code command @commands.command() async def code(self, ctx): + """Sends bot repo link.""" await ctx.send("https://github.com/TKLprojects/travbot.py") # Desc command @commands.command() async def desc(self, ctx, *, cname): + """Changes voice channel name. Usage: ?desc """ channel = ctx.author.voice.channel await channel.edit(name=cname) await ctx.send(f'Changed channel name to "{cname}"') @@ -97,12 +100,13 @@ async def _weather(self, ctx, city_name): with open("storage/weathertoken.txt") as tokenweather: weathertoken = tokenweather.readlines(1) base_url = "http://api.weatherapi.com/v1/current.json?" - complete_url = base_url + "key=f44ceda5450e4c16be585450200805" + "&q=" + str(city_name) + complete_url = base_url + "key=" + str(weathertoken) + "&q=" + str(city_name) try: response = requests.get(complete_url) except BaseException: await ctx.send("no") res = response.json() + # TODO #5 Fix KeyError (can't read token) weather = res["current"] location = res["location"] condition = weather["condition"] @@ -127,6 +131,12 @@ async def _weather(self, ctx, city_name): weatherembed.add_field(name="Time:", value=weather_timezone) weatherembed.set_thumbnail(url=image) await ctx.send(embed=weatherembed) + @commands.command() + async def reboot(self, ctx): + """Reboots the bot, if you run via pm2.""" + await ctx.send("Rebooting...") + exit() + # This always needs to be at the end of a cog file: def setup(client): From 2725c23dec3f3d167787cdcf85d16e0f3930ad67 Mon Sep 17 00:00:00 2001 From: keanuplayz Date: Sat, 23 May 2020 12:05:47 +0200 Subject: [PATCH 6/7] Fix KeyError (can't read token) Fixes #5 Also migrated away from dotenv. Co-authored-by: Zeehondie --- .gitignore | 2 +- cogs/utility.py | 10 ++++++---- main.py | 10 +++------- 3 files changed, 10 insertions(+), 12 deletions(-) diff --git a/.gitignore b/.gitignore index c0f0eb9..2d1a429 100644 --- a/.gitignore +++ b/.gitignore @@ -131,5 +131,5 @@ dmypy.json todo.txt .vscode/launch.json storage/prefixes.json -storage/weathertoken.txt .vscode/settings.json +storage/tokens.json \ No newline at end of file diff --git a/cogs/utility.py b/cogs/utility.py index 1a04580..32ec430 100644 --- a/cogs/utility.py +++ b/cogs/utility.py @@ -4,7 +4,8 @@ from discord.ext import commands import math import requests -import dotenv +import dotenv +import json # Cog class: class Utility(commands.Cog): @@ -97,8 +98,9 @@ async def desc(self, ctx, *, cname): @commands.command(name="weather") async def _weather(self, ctx, city_name): """Get weather information about a location. Usage: ?weather """ - with open("storage/weathertoken.txt") as tokenweather: - weathertoken = tokenweather.readlines(1) + with open("storage/tokens.json") as tokensfile: + tokenfile = json.load(tokensfile) + weathertoken = tokenfile['weather'] base_url = "http://api.weatherapi.com/v1/current.json?" complete_url = base_url + "key=" + str(weathertoken) + "&q=" + str(city_name) try: @@ -140,4 +142,4 @@ async def reboot(self, ctx): # This always needs to be at the end of a cog file: def setup(client): - client.add_cog(Utility(client)) \ No newline at end of file + client.add_cog(Utility(client)) # ga naar weather \ No newline at end of file diff --git a/main.py b/main.py index a3c598a..fbe6c2e 100644 --- a/main.py +++ b/main.py @@ -14,13 +14,6 @@ handler.setFormatter(logging.Formatter('%(asctime)s:%(levelname)s:%(name)s: %(message)s')) logger.addHandler(handler) -# Dotenv -import dotenv -from dotenv import load_dotenv -load_dotenv() -token = os.getenv('DISCORD_TOKEN') -weathertoken = os.getenv('WEATHER_TOKEN') - # Server specific prefixes def get_prefix(client, message): with open('./storage/prefixes.json', 'r') as f: @@ -82,5 +75,8 @@ async def cprefix(ctx, prefix): json.dump(prefixes, f, indent=4) await ctx.send(f'Prefix changed to: {prefix}') +with open("storage/tokens.json") as tokensfile: + tokenfile = json.load(tokensfile) + token = tokenfile['bot'] client.run(token) \ No newline at end of file From 0940d56ccfc8964878b707facd89bd376b6fb587 Mon Sep 17 00:00:00 2001 From: keanuplayz Date: Sun, 24 May 2020 11:06:50 +0200 Subject: [PATCH 7/7] Added more commands. Emote, react, userinfo, serverinfo Co-authored-by: Zeehondie --- cogs/fun.py | 20 ++++++++++++++------ cogs/utility.py | 46 +++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 59 insertions(+), 7 deletions(-) diff --git a/cogs/fun.py b/cogs/fun.py index 06c3d9a..1ef09ce 100644 --- a/cogs/fun.py +++ b/cogs/fun.py @@ -15,9 +15,15 @@ def __init__(self, client): # This is an event: # @commands.Cog.listener() # async def on_ready(self): - # print('This will be printed to the console.') -# This is a command: + @commands.command() + async def react(self, ctx, emote): + if isinstance(emote, int): + emotename = client.get_emoji(emote) + if isinstance(emote, str): + emotename = discord.utils.get(self.client.emojis, name=emote) + await ctx.message.add_reaction(emotename) + @commands.command(name="8ball") async def _8ball(self, ctx): import random @@ -61,10 +67,12 @@ async def urban(self, ctx, *, word): @commands.command() - async def emote(self, ctx, emote): - emoji = discord.Emoji() - emoteurl = emoji.url - await ctx.send(emoteurl) + async def emote(self, ctx, search_term): + if isinstance(search_term, int): + emotename = client.get_emoji(search_term) + if isinstance(search_term, str): + emotename = discord.utils.get(self.client.emojis, name=search_term) + await ctx.send(emotename) @commands.command(hidden=True) async def tts(self, ctx, *, message): diff --git a/cogs/utility.py b/cogs/utility.py index 32ec430..7016fcb 100644 --- a/cogs/utility.py +++ b/cogs/utility.py @@ -6,6 +6,7 @@ import requests import dotenv import json +import datetime # Cog class: class Utility(commands.Cog): @@ -133,13 +134,56 @@ async def _weather(self, ctx, city_name): weatherembed.add_field(name="Time:", value=weather_timezone) weatherembed.set_thumbnail(url=image) await ctx.send(embed=weatherembed) + @commands.command() async def reboot(self, ctx): """Reboots the bot, if you run via pm2.""" await ctx.send("Rebooting...") exit() + # Userinfo command + @commands.command() + async def userinfo(self, ctx): + """Displays info about author.""" + currentDate = datetime.datetime.now() + avi_url = ctx.author.avatar_url + infoembed = discord.Embed() + infoembed.set_author(name=ctx.author.name + "#" + ctx.author.discriminator,icon_url=avi_url) + infoembed.add_field(name="Status", value=ctx.author.status) + infoembed.add_field(name="Joined at", value=str(ctx.author.joined_at.day) + "-" + str(ctx.author.joined_at.month) + "-" + str(ctx.author.joined_at.year) + " " + str(ctx.author.joined_at.hour) + ":" + str(ctx.author.joined_at.minute)) + infoembed.add_field(name="Registered at", value=str(ctx.author.created_at.day) + "-" + str(ctx.author.created_at.month) + "-" + str(ctx.author.created_at.year) + " " + str(ctx.author.created_at.hour) + ":" + str(ctx.author.created_at.minute)) + infoembed.add_field(name="Nickname", value=ctx.author.display_name) + infoembed.set_footer(text=str(currentDate.day) + "-" + str(currentDate.month) + "-" + str(currentDate.year) + " " + str(currentDate.hour) + ":" + str(currentDate.minute) + ":" + str(currentDate.second)) + infoembed.set_thumbnail(url=avi_url) + await ctx.send(embed=infoembed) + + # Serverinfo command + @commands.command() + async def serverinfo(self, ctx): + """Displays info about the current guild.""" + serverembed = discord.Embed(title="Server info") + serverembed.add_field(name="Server Name",value=ctx.guild.name) + serverembed.add_field(name="Owner",value=ctx.guild.owner) + serverembed.add_field(name="Members",value=len(ctx.guild.members)) + serverembed.add_field(name="Channels",value=len(ctx.guild.text_channels + ctx.guild.voice_channels)) + serverembed.add_field(name="Text Channels",value=len(ctx.guild.text_channels)) + serverembed.add_field(name="Voice Channels",value=len(ctx.guild.voice_channels)) + serverembed.set_thumbnail(url=ctx.guild.icon_url) + await ctx.send(embed=serverembed) + + # Poll command + # @commands.command() + # async def poll(self, ctx, question, *options: str): + # """Display a poll""" + # import time + # pollembed = discord.Embed(description=question) + # pollembed.set_author(name=f"Poll created by {ctx.message.author}",icon_url=ctx.guild.icon_url) + # pollembed.set_footer(text="React to vote.") + # reactions = ['✅', '❌'] + # reactmessage = await ctx.send(embed=pollembed) + # for reaction in reactions: + # await ctx.message.add_reaction(reaction) # This always needs to be at the end of a cog file: def setup(client): - client.add_cog(Utility(client)) # ga naar weather \ No newline at end of file + client.add_cog(Utility(client)) \ No newline at end of file