mirror of
https://github.com/miaowware/qrm2.git
synced 2025-09-08 15:37:47 -04:00
remove lingering references to globalsettings
This commit is contained in:
parent
87dd795258
commit
eb23a592bd
@ -14,12 +14,12 @@ import discord
|
|||||||
from discord.ext import commands, tasks
|
from discord.ext import commands, tasks
|
||||||
|
|
||||||
from ctyparser import BigCty
|
from ctyparser import BigCty
|
||||||
|
import common as cmn
|
||||||
|
|
||||||
|
|
||||||
class LookupCog(commands.Cog):
|
class LookupCog(commands.Cog):
|
||||||
def __init__(self, bot):
|
def __init__(self, bot):
|
||||||
self.bot = bot
|
self.bot = bot
|
||||||
self.gs = bot.get_cog("GlobalSettings")
|
|
||||||
try:
|
try:
|
||||||
self.CTY = BigCty('./data/cty.json')
|
self.CTY = BigCty('./data/cty.json')
|
||||||
except OSError:
|
except OSError:
|
||||||
@ -52,7 +52,7 @@ class LookupCog(commands.Cog):
|
|||||||
embed.set_footer(text=f'{ctx.author.name} | Last Updated: {self.CTY.formatted_version}',
|
embed.set_footer(text=f'{ctx.author.name} | Last Updated: {self.CTY.formatted_version}',
|
||||||
icon_url=str(ctx.author.avatar_url))
|
icon_url=str(ctx.author.avatar_url))
|
||||||
embed.description = f'Prefix {query} not found'
|
embed.description = f'Prefix {query} not found'
|
||||||
embed.colour = self.gs.colours.bad
|
embed.colour = cmn.colours.bad
|
||||||
while noMatch:
|
while noMatch:
|
||||||
if query in self.CTY.keys():
|
if query in self.CTY.keys():
|
||||||
queryMatch = query
|
queryMatch = query
|
||||||
@ -74,10 +74,10 @@ class LookupCog(commands.Cog):
|
|||||||
.add_field(name="Time Zone",
|
.add_field(name="Time Zone",
|
||||||
value=f'+{data["tz"]}' if data['tz'] > 0 else str(data['tz']))
|
value=f'+{data["tz"]}' if data['tz'] > 0 else str(data['tz']))
|
||||||
embed.description = ''
|
embed.description = ''
|
||||||
embed.colour = self.gs.colours.good
|
embed.colour = cmn.colours.good
|
||||||
else:
|
else:
|
||||||
result = f'CTY.DAT last updated on {self.CTY.formatted_version}'
|
result = f'CTY.DAT last updated on {self.CTY.formatted_version}'
|
||||||
embed = discord.Embed(title=result, colour=self.gs.colours.neutral)
|
embed = discord.Embed(title=result, colour=cmn.colours.neutral)
|
||||||
embed.set_footer(text=f'{ctx.author.name}',
|
embed.set_footer(text=f'{ctx.author.name}',
|
||||||
icon_url=str(ctx.author.avatar_url))
|
icon_url=str(ctx.author.avatar_url))
|
||||||
await ctx.send(embed=embed)
|
await ctx.send(embed=embed)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user