about summary refs log tree commit diff stats
path: root/cogs
diff options
context:
space:
mode:
authorredcreeper14385 <mounderfod@gmail.com>2021-08-31 17:56:00 +0100
committerredcreeper14385 <mounderfod@gmail.com>2021-08-31 17:56:00 +0100
commit45ddeff3ec499e79d82ee265d729c8e0c453e020 (patch)
treec643caf0c078ba505c3e6bcfd157a44b265f536d /cogs
parent75045f045f1fc524b6a0f5e7b40a87dffc377cdf (diff)
downloadtiny-potato-bot-45ddeff3ec499e79d82ee265d729c8e0c453e020.tar.gz
Port to nextcord :D
Diffstat (limited to 'cogs')
-rw-r--r--cogs/fun.py10
-rw-r--r--cogs/modrinth.py8
-rw-r--r--cogs/utils.py6
3 files changed, 12 insertions, 12 deletions
diff --git a/cogs/fun.py b/cogs/fun.py
index c105934..297fb67 100644
--- a/cogs/fun.py
+++ b/cogs/fun.py
@@ -1,6 +1,6 @@
-import discord
+import nextcord
 import requests
-from discord.ext import commands
+from nextcord.ext import commands
 import urllib.request
 import random
 
@@ -24,7 +24,7 @@ class Fun(commands.Cog):
         else:
             url = random.choice(["https://fabric-drama.herokuapp.com/txt", "https://mc-drama.herokuapp.com/raw"])
         response = urllib.request.urlopen(url).read().decode('utf-8')
-        embed = discord.Embed(color=0xa37dca)
+        embed = nextcord.Embed(color=0xa37dca)
         embed.add_field(name=f"{ctx.author.name} caused drama!", value=response, inline=False)
         embed.set_footer(text="Tiny Potato Bot v1.0.0")
         await ctx.send(embed=embed)
@@ -38,7 +38,7 @@ class Fun(commands.Cog):
         if comic is None:
             try:
                 response = requests.get('https://xkcd.com/info.0.json').json()
-                embed = discord.Embed(title=f"XKCD {response['num']}: {response['safe_title']}", colour=0xa37dca)
+                embed = nextcord.Embed(title=f"XKCD {response['num']}: {response['safe_title']}", colour=0xa37dca)
                 embed.set_image(url=response['img'])
                 embed.set_footer(text=response['alt'])
                 await ctx.send(embed=embed)
@@ -49,7 +49,7 @@ class Fun(commands.Cog):
         else:
             try:
                 response = requests.get(f'https://xkcd.com/{comic}/info.0.json').json()
-                embed = discord.Embed(title=f"XKCD {response['num']}: {response['safe_title']}", colour=0xa37dca)
+                embed = nextcord.Embed(title=f"XKCD {response['num']}: {response['safe_title']}", colour=0xa37dca)
                 embed.set_image(url=response['img'])
                 embed.set_footer(text=response['alt'])
                 await ctx.send(embed=embed)
diff --git a/cogs/modrinth.py b/cogs/modrinth.py
index dff091b..0dddc78 100644
--- a/cogs/modrinth.py
+++ b/cogs/modrinth.py
@@ -1,5 +1,5 @@
-import discord
-from discord.ext import commands
+import nextcord
+from nextcord.ext import commands
 import requests, datetime, math
 
 class Modrinth(commands.Cog):
@@ -11,7 +11,7 @@ class Modrinth(commands.Cog):
     If you get a JSONDecodeError it's because the mod could not be found!""", aliases=['mrmod', 'modrmod'])
     async def modrinth_mod(self, ctx, mod): # 5da426
         response = requests.get(f'https://api.modrinth.com/api/v1/mod/{mod}').json()
-        embed = discord.Embed(title = response['title'], url=f'https://modrinth.com/mod/{mod}', description = response['description'], color = 0x5da426)
+        embed = nextcord.Embed(title = response['title'], url=f'https://modrinth.com/mod/{mod}', description = response['description'], color = 0x5da426)
         embed.set_thumbnail(url = response['icon_url'])
         embed.add_field(name='Mod ID', value = response['id'], inline=True)
         embed.add_field(name='Categories', value = ', '.join(response['categories']), inline=True)
@@ -24,7 +24,7 @@ class Modrinth(commands.Cog):
         If you get a JSONDecodeError it's because the user could not be found!""", aliases=['mruser', 'modruser'])
     async def modrinth_user(self, ctx, user):  # 5da426
         response = requests.get(f'https://api.modrinth.com/api/v1/user/{user}').json()
-        embed = discord.Embed(title=response['username'], url=f'https://modrinth.com/user/{user}',
+        embed = nextcord.Embed(title=response['username'], url=f'https://modrinth.com/user/{user}',
                               description=response['bio'], color=0x5da426)
         embed.set_thumbnail(url=response['avatar_url'])
         embed.add_field(name='User ID', value=response['id'], inline=True)
diff --git a/cogs/utils.py b/cogs/utils.py
index c06049b..4657ad2 100644
--- a/cogs/utils.py
+++ b/cogs/utils.py
@@ -1,5 +1,5 @@
-import discord
-from discord.ext import commands
+import nextcord
+from nextcord.ext import commands
 
 class Utils(commands.Cog):
     def __init__(self, bot):
@@ -7,7 +7,7 @@ class Utils(commands.Cog):
 
     @commands.command(name="about", brief="Gives information about the bot.", help="Gives information about the bot.")
     async def about(self, ctx):
-        embed = discord.Embed(title="Tiny Potato Bot",
+        embed = nextcord.Embed(title="Tiny Potato Bot",
                               description="The creator of Tiny Potato Bot is mounderfod (aka redcreeper14385), find him here:",
                               color=0xa37dca)
         embed.add_field(name="GitHub", value="https://github.com/redcreeper14385", inline=False)