Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor branch to dev #22

Merged
merged 71 commits into from
Dec 28, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
a554ede
Starting to refactor Utility.py
MujyKun Dec 26, 2020
db3893f
Lastfm refactor
A-Phamfam Dec 26, 2020
5359cee
fixed issue with static method referencing Utility object
MujyKun Dec 26, 2020
a6954bc
Refactor patreon
A-Phamfam Dec 26, 2020
634a5ef
Refactor moderator
A-Phamfam Dec 26, 2020
77af4ee
Refactor customcommands
A-Phamfam Dec 26, 2020
e89d968
Refactor Biasgame
A-Phamfam Dec 26, 2020
766fde1
Refactor datadog
A-Phamfam Dec 26, 2020
f41da4d
Finished Refactoring Cache Util
MujyKun Dec 26, 2020
0aab956
Finished Refactoring Cache Util
MujyKun Dec 26, 2020
86419fd
Finished Refactoring Currency Util
MujyKun Dec 26, 2020
6719b24
Refactor weverse
A-Phamfam Dec 26, 2020
3fe154f
Refactor self assign roles
A-Phamfam Dec 26, 2020
7a192e7
Refactor reminder
A-Phamfam Dec 26, 2020
c6cdb5d
Refactor twitter
A-Phamfam Dec 26, 2020
5c0ceb2
Finished Refactoring Miscellaneous Util
MujyKun Dec 26, 2020
3113a1e
Refactor logging
A-Phamfam Dec 26, 2020
7c35245
Finished Refactoring BlackJack Util
MujyKun Dec 26, 2020
fe4fc01
Finished Refactoring Levels Util
MujyKun Dec 26, 2020
0c99d21
Refactor groupmembers
A-Phamfam Dec 26, 2020
1e77641
Merge pull request #3 from MujyKun/database
MujyKun Dec 26, 2020
de3c6a6
Merge pull request #4 from MujyKun/cache
MujyKun Dec 26, 2020
0822d64
Merge branch 'refactor' into currency
MujyKun Dec 26, 2020
14eb905
Merge pull request #5 from MujyKun/currency
MujyKun Dec 26, 2020
e794037
Merge branch 'refactor' into miscellaneous
MujyKun Dec 26, 2020
9f3a766
Merge pull request #6 from MujyKun/miscellaneous
MujyKun Dec 26, 2020
08e96f0
Merge branch 'refactor' into GroupMembers
MujyKun Dec 26, 2020
9712d44
Merge pull request #7 from MujyKun/GroupMembers
MujyKun Dec 26, 2020
4f37d0d
Merge branch 'refactor' into Logging
MujyKun Dec 26, 2020
7293ed2
Merge pull request #8 from MujyKun/Logging
MujyKun Dec 26, 2020
f3dfe03
Merge pull request #9 from MujyKun/Twitter
MujyKun Dec 26, 2020
694d6b2
Merge branch 'refactor' into Reminder
MujyKun Dec 26, 2020
d31cf24
Merge pull request #10 from MujyKun/Reminder
MujyKun Dec 26, 2020
3e52802
Merge branch 'refactor' into blackjack
MujyKun Dec 26, 2020
4945861
Merge pull request #11 from MujyKun/blackjack
MujyKun Dec 26, 2020
1961508
Merge pull request #12 from MujyKun/SelfAssignroles
MujyKun Dec 26, 2020
18f04c2
Merge branch 'refactor' into levels
MujyKun Dec 26, 2020
c80b818
Merge pull request #13 from MujyKun/levels
MujyKun Dec 26, 2020
11aac30
Merge branch 'refactor' into Weverse
MujyKun Dec 26, 2020
a20cb17
Merge pull request #14 from MujyKun/Weverse
MujyKun Dec 26, 2020
e714689
Merge branch 'refactor' into DataDog
MujyKun Dec 26, 2020
e00388c
Merge pull request #15 from MujyKun/DataDog
MujyKun Dec 26, 2020
f05b6dc
Merge pull request #16 from MujyKun/BiasGame
MujyKun Dec 26, 2020
6dc80d3
Merge branch 'refactor' into CustomCommands
MujyKun Dec 26, 2020
e68086c
Merge pull request #17 from MujyKun/CustomCommands
MujyKun Dec 26, 2020
4bd96a4
Merge branch 'refactor' into Moderator
MujyKun Dec 26, 2020
71659ab
Merge pull request #18 from MujyKun/Moderator
MujyKun Dec 26, 2020
60ce101
Merge branch 'refactor' into Patreon
MujyKun Dec 26, 2020
87a924f
Merge pull request #19 from MujyKun/Patreon
MujyKun Dec 26, 2020
db99ac6
Merge pull request #20 from MujyKun/Last_FM
MujyKun Dec 26, 2020
e5e64a5
Merge branch 'dev' into refactor
MujyKun Dec 26, 2020
8ae08ba
Need help fixing stuff
MujyKun Dec 26, 2020
2e5ebde
Refactor to ex.subclass
A-Phamfam Dec 26, 2020
cafa847
ex.subclasses
MujyKun Dec 26, 2020
ce0b1cf
Merge pull request #23 from MujyKun/refactor_p
MujyKun Dec 26, 2020
1547fd7
ex.subclasses
MujyKun Dec 26, 2020
4abdbb7
ex.subclasses
MujyKun Dec 26, 2020
1438d04
Changed so .get_cooldown_time() is being called from the proper subclass
A-Phamfam Dec 26, 2020
6fceb0d
Currently cleaning up warnings
MujyKun Dec 26, 2020
a9eb7aa
Merge branch 'refactor' of https://github.com/MujyKun/IreneBot into r…
MujyKun Dec 26, 2020
65e9e47
Added PyCharm inspection comments, shortened exceptions, and cleared …
MujyKun Dec 27, 2020
aa76edb
Added comments for acceptable Pycharm coding style violations
MujyKun Dec 27, 2020
cf5544e
Made all necessary methods static
MujyKun Dec 27, 2020
d4e7f2e
Added .gitkeep to folders and using .gitignore properly
MujyKun Dec 27, 2020
cbc764f
Removed unused module Cogs.
MujyKun Dec 27, 2020
3fdd556
Added a few comments in Utility
MujyKun Dec 27, 2020
4fd07b5
Added few comments
MujyKun Dec 28, 2020
12a0435
Added flask as a requirement
MujyKun Dec 28, 2020
c1e7c9e
Fixed references to methods that have been moved to util classes
A-Phamfam Dec 28, 2020
0d7c450
Fixed referencing issues with Utility and Utils
MujyKun Dec 28, 2020
0202b36
Merge branch 'refactor' of https://github.com/MujyKun/IreneBot into r…
MujyKun Dec 28, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Added comments for acceptable Pycharm coding style violations
  • Loading branch information
MujyKun committed Dec 27, 2020
commit aa76edb7b9f0a1f80ea90b1a33d6dc7078541e4b
2 changes: 1 addition & 1 deletion Utility.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"""


# noinspection PyBroadException
# noinspection PyBroadException,PyPep8
class Utility:
def __init__(self):
self.test_bot = None # this is changed in run.py
Expand Down
2 changes: 1 addition & 1 deletion module/Archive.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from Utility import resources as ex


# noinspection PyBroadException,PyBroadException
# noinspection PyBroadException,PyPep8
class Archive(commands.Cog):
@staticmethod
async def on_message(message, owner=0):
Expand Down
3 changes: 2 additions & 1 deletion module/BiasGame.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import asyncio


# noinspection PyPep8
class BiasGame(commands.Cog):
@commands.command(aliases=['bg'])
async def biasgame(self, ctx, gender="all", bracket_size=8):
Expand Down Expand Up @@ -49,7 +50,7 @@ async def listbg(self, ctx, user: discord.Member = None):
await ctx.send(msg_string)


# noinspection PyBroadException
# noinspection PyBroadException,PyPep8
class Game:
def __init__(self):
self.host_ctx = None # ctx of the host starting game
Expand Down
1 change: 1 addition & 0 deletions module/BlackJack.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from Utility import resources as ex


# noinspection PyPep8
class BlackJack(commands.Cog):
@commands.command(aliases=['bj'])
async def blackjack(self, ctx, amount="0", versus="player"):
Expand Down
2 changes: 1 addition & 1 deletion module/BotMod.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import aiofiles


# noinspection PyBroadException
# noinspection PyBroadException,PyPep8
class BotMod(commands.Cog):
@staticmethod
async def mod_on_message(message):
Expand Down
16 changes: 8 additions & 8 deletions module/Currency.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from Utility import resources as ex


# noinspection PyBroadException
# noinspection PyBroadException,PyPep8
class Currency(commands.Cog):
"""
Will be rewritten from scratch
Expand Down Expand Up @@ -70,7 +70,7 @@ async def bet(self, ctx, *, balance="1"):
await ex.u_currency.register_user(user_id)
amount = await ex.u_currency.get_balance(user_id)
if balance > amount:
await ctx.send(embed=await ex.create_embed(title="Not Enough Money", title_desc=f"**You do not have enough money to bet {balance:,}. You have {amount:,} Dollars.**" ))
await ctx.send(embed=await ex.create_embed(title="Not Enough Money", title_desc=f"**You do not have enough money to bet {balance:,}. You have {amount:,} Dollars.**"))
if balance <= amount:
a = randint(1, 100)
if a <= 50:
Expand Down Expand Up @@ -197,7 +197,7 @@ async def level_up_process():
await ex.u_currency.update_balance(user_id, str(user_balance - money_needed_to_level))
await ex.u_levels.set_level(user_id, user_level + 1, command.lower())
embed = await ex.create_embed(title="You Have Leveled Up!",
title_desc=f"<@{ctx.author.id}>, You are now at level {user_level+1}")
title_desc=f"<@{ctx.author.id}>, You are now at level {user_level+1}")
await ctx.send(embed=embed)
ctx.command.reset_cooldown(ctx)
else:
Expand Down Expand Up @@ -244,24 +244,24 @@ async def rob(self, ctx, *, user: discord.Member = discord.Member):
if user_money >= 0:
# b value is out of 20 so each 5% is considered 1
all_possible_values = []
for i in range (rob_percent_to_win, 21):
for i in range(rob_percent_to_win, 21):
if i == rob_percent_to_win:
for j in range (rob_percent_to_win):
for j in range(rob_percent_to_win):
all_possible_values.append(i)
else:
all_possible_values.append(i)
random_number = choice(all_possible_values)
if random_number != rob_percent_to_win:
await ctx.send(embed=await ex.create_embed(title="Robbed User",
title_desc=f"**<@{ctx.author.id}> has failed to rob <@{robbed_user_id}>.**"))
title_desc=f"**<@{ctx.author.id}> has failed to rob <@{robbed_user_id}>.**"))
if random_number == rob_percent_to_win:
if user_money >= 100:
random_amount = await ex.u_currency.get_robbed_amount(author_money, user_money, level)
try:
await ex.u_currency.update_balance(robbed_user_id, str(user_money - random_amount))
await ex.u_currency.update_balance(ctx.author.id, str(author_money + random_amount))
await ctx.send(embed=await ex.create_embed(title="Robbed User",
title_desc=f"**<@{ctx.author.id}> has stolen ${random_amount:,} from <@{robbed_user_id}>.**"))
title_desc=f"**<@{ctx.author.id}> has stolen ${random_amount:,} from <@{robbed_user_id}>.**"))
except Exception as e:
await ctx.send(f"> **The Database is locked... -- {e}**")
elif user_money < 100:
Expand Down Expand Up @@ -344,7 +344,7 @@ async def rps(self, ctx, rps_choice='', amount="0"):
await ctx.send(embed=await ex.create_embed(title="Rock Paper Scissors", title_desc=f"**You Won {cd:,} Dollars! I chose {compchoice} while you chose {rps_choice}!**"))
await ex.u_currency.update_balance(user_id, str(current_balance + cd))
if rps_choice == 'scissors' or rps_choice == 's':
await ctx.send(embed=await ex.create_embed(title="Rock Paper Scissors",title_desc=f"**You Lost {amount:,} Dollars! I chose {compchoice} while you chose {rps_choice}!**"))
await ctx.send(embed=await ex.create_embed(title="Rock Paper Scissors", title_desc=f"**You Lost {amount:,} Dollars! I chose {compchoice} while you chose {rps_choice}!**"))
await ex.u_currency.update_balance(user_id, str(current_balance - amount))
if compchoice == 'paper':
if rps_choice == 'rock' or rps_choice == 'r':
Expand Down
3 changes: 2 additions & 1 deletion module/CustomCommands.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from Utility import resources as ex


# noinspection PyPep8
class CustomCommands(commands.Cog):
@staticmethod
async def process_custom_commands(message):
Expand Down Expand Up @@ -51,7 +52,7 @@ async def listcommands(self, ctx):
try:
async def get_new_embed(desc):
return await ex.create_embed(f"Custom Commands for {ctx.guild.name} ({ctx.guild.id})", color=ex.get_random_color(),
title_desc=desc)
title_desc=desc)
custom_commands = ex.cache.custom_commands.get(ctx.guild.id)
embed_list = []
embed_message = ""
Expand Down
6 changes: 5 additions & 1 deletion module/GroupMembers.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
client = keys.client
# the amount normal users can use if the guild owner is a super patron.
owner_super_patron_benefit = keys.idol_post_send_limit * 2
# noinspection PyPep8
patron_message = f"""
As of September 23rd 2020, non-Patrons can only send {keys.idol_post_send_limit} photos a day maximum, as the current host can not reliably handle additional traffic.
You may become a patron for as little as $3 per month in order to send unlimited photos; every Patron contributes to upgrading and maintaining the host.
Expand All @@ -31,13 +32,15 @@ def add_user_limit(message_sender):
ex.cache.commands_used[message_sender.id] = [ex.cache.commands_used[message_sender.id][0] + 1, time.time()]


# noinspection PyPep8
async def check_user_limit(message_sender, message_channel, no_vote_limit=False):
limit = keys.idol_post_send_limit
if no_vote_limit:
# amount of votes that can be sent without voting.
limit = keys.idol_no_vote_send_limit
if message_sender.id in ex.cache.commands_used:
if not await ex.u_patreon.check_if_patreon(message_sender.id) and ex.cache.commands_used[message_sender.id][0] > limit:
# noinspection PyPep8
if not await ex.u_patreon.check_if_patreon(message_channel.guild.owner.id, super=True) and not no_vote_limit:
return await message_channel.send(patron_message)
elif ex.cache.commands_used[message_sender.id][0] > owner_super_patron_benefit and not no_vote_limit:
Expand All @@ -47,6 +50,7 @@ async def check_user_limit(message_sender, message_channel, no_vote_limit=False)
return False


# noinspection PyPep8
async def request_image_post(message, idol, channel):
photo_msg, api_url, posted = None, None, False
if not await ex.u_miscellaneous.check_if_bot_banned(message.author.id):
Expand Down Expand Up @@ -94,7 +98,7 @@ async def check_photo_count(t_member_ids):
return idol


# noinspection PyBroadException
# noinspection PyBroadException,PyPep8
class GroupMembers(commands.Cog):
@staticmethod
async def on_message2(message):
Expand Down
9 changes: 4 additions & 5 deletions module/GuessingGame.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import asyncio


# noinspection PyPep8
class GuessingGame(commands.Cog):
@commands.command(aliases=['gg'])
async def guessinggame(self, ctx, gender="all", rounds=20, timeout=20):
Expand Down Expand Up @@ -31,7 +32,7 @@ async def stopgg(self, ctx):
await ex.stop_game(ctx, ex.cache.guessing_games)


# noinspection PyBroadException
# noinspection PyBroadException,PyPep8
class Game:
def __init__(self):
self.photo_link = None
Expand Down Expand Up @@ -67,8 +68,7 @@ def check_correct_answer(message):
"""Check if the user has the correct answer."""
return ((message.content.lower() in self.correct_answers) or
((message.content.lower() == 'skip' or message.content.lower() in stop_phrases)
and message.author.id == self.host)) and \
message.channel == self.channel
and message.author.id == self.host)) and message.channel == self.channel
try:
msg = await ex.client.wait_for('message', check=check_correct_answer, timeout=self.timeout)
await msg.add_reaction(keys.check_emoji)
Expand Down Expand Up @@ -137,8 +137,7 @@ async def print_answer(self, question_skipped=False):
if question_skipped:
skipped = "Question Skipped. "
msg = await self.channel.send(f"{skipped}The correct answer was `{self.idol.full_name} ({self.idol.stage_name})`"
f" from the following group(s): `{', '.join(self.group_names)}`",
delete_after=15)
f" from the following group(s): `{', '.join(self.group_names)}`", delete_after=15)
# create_task should not be awaited because this is meant to run in the background to check for reactions.
try:
# noinspection PyUnusedLocal
Expand Down
1 change: 1 addition & 0 deletions module/Help.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ def __init__(self):
ex.client.help_command = self.SubHelp()
ex.client.help_command.cog = self

# noinspection PyPep8
class SubHelp(commands.MinimalHelpCommand):
async def get_server_prefix(self):
return await ex.get_server_prefix_by_context(self.context)
Expand Down
2 changes: 1 addition & 1 deletion module/LastFM.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import typing


# noinspection PyBroadException
# noinspection PyBroadException,PyPep8
class LastFM(commands.Cog):
def __init__(self):
self.user_not_found = "That user was not found. Refer to `setfm` to link an account."
Expand Down
1 change: 1 addition & 0 deletions module/Logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from Utility import resources as ex


# noinspection PyPep8
class Logging(commands.Cog):
@staticmethod
async def on_message_log(message):
Expand Down
8 changes: 4 additions & 4 deletions module/Miscellaneous.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import datetime


# noinspection PyBroadException,PyBroadException
# noinspection PyBroadException,PyPep8
class Miscellaneous(commands.Cog):
@staticmethod
async def on_message_notifications(message):
Expand Down Expand Up @@ -350,7 +350,7 @@ async def urban(self, ctx, term=None, number=1, override=0):
try:
first_result = (result['list'])[number-1]
except:
return await ctx.send (f"> **It is not possible to find definition number `{number}` for the word: `{term}`.**")
return await ctx.send(f"> **It is not possible to find definition number `{number}` for the word: `{term}`.**")
await ctx.send(f">>> **`Word: {term}`\n`Definition Number: {number}`\n{first_result['definition']}**")
else:
log.console(r.status)
Expand Down Expand Up @@ -413,14 +413,14 @@ async def serverinfo(self, ctx):
"""View information about the current guild. [Format: %serverinfo]"""
try:
guild = ctx.guild
embed = discord.Embed(title= f"{guild.name} ({guild.id})", color=0xffb6c1, url=f"{guild.icon_url}")
embed = discord.Embed(title=f"{guild.name} ({guild.id})", color=0xffb6c1, url=f"{guild.icon_url}")
embed.set_author(name="Irene", url=keys.bot_website,
icon_url='https://cdn.discordapp.com/emojis/693392862611767336.gif?v=1')
embed.set_footer(text="Thanks for using Irene.",
icon_url='https://cdn.discordapp.com/emojis/683932986818822174.gif?v=1')
embed.set_thumbnail(url=guild.icon_url)
embed.add_field(name="Owner", value=f"{guild.owner} ({guild.owner.id})", inline=True)
embed.add_field(name="Region", value=guild.region , inline=True)
embed.add_field(name="Region", value=guild.region, inline=True)
embed.add_field(name="Users", value=guild.member_count, inline=True)
embed.add_field(name="Roles", value=f"{len(guild.roles)}", inline=True)
embed.add_field(name="Emojis", value=f"{len(guild.emojis)}", inline=True)
Expand Down
4 changes: 2 additions & 2 deletions module/Moderator.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import aiohttp


# noinspection PyBroadException
# noinspection PyBroadException,PyPep8
class Moderator(commands.Cog):
@commands.command()
@commands.has_guild_permissions(manage_messages=True)
Expand Down Expand Up @@ -200,7 +200,7 @@ async def unmute(self, ctx, user: discord.Member = None):
return await ctx.send(">**This user was not muted by me as the mute role could not be found. In order for me to create a custom mute role, I need to mute someone first.**")
if muted:
await user.remove_roles(mute_role,
reason=f"UnMuting User - Requested by {ctx.author.display_name} ({user.id})")
reason=f"UnMuting User - Requested by {ctx.author.display_name} ({user.id})")
return await ctx.send(f"> **<@{user.id}> has been unmuted.**")
else:
return await ctx.send(f"> **<@{user.id}> is not muted.**")
Expand Down
9 changes: 5 additions & 4 deletions module/Music.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ async def download_video(video):
return YTDLSource(discord.FFmpegPCMAudio(file_name, **ffmpeg_options), data=data)


# noinspection PyBroadException
# noinspection PyBroadException,PyPep8
def check_live(video):
# return None = video is downloaded
# return a message = video is ignored
Expand All @@ -50,6 +50,7 @@ def check_live(video):
except:
return # this error occurs from is_live not being found.


# https://github.com/ytdl-org/youtube-dl/blob/2391941f283a1107b01f9df76a8b0e521a5abe3b/youtube_dl/YoutubeDL.py#L143
ytdl_format_options = {
'format': 'bestaudio/best',
Expand Down Expand Up @@ -77,7 +78,7 @@ def check_live(video):
queued = {}


# noinspection PyBroadException
# noinspection PyBroadException,PyPep8
class Music(commands.Cog):
# noinspection PyBroadException
@tasks.loop(seconds=30, minutes=1, hours=0, reconnect=True)
Expand Down Expand Up @@ -318,7 +319,7 @@ async def move(self, ctx, song_number: int):

# noinspection PyBroadException
@commands.command()
async def remove(self, ctx, song_number:int):
async def remove(self, ctx, song_number: int):
"""Remove a song from the queue. [Format: %remove (song number)] """
try:
if self.check_user_in_vc(ctx):
Expand Down Expand Up @@ -516,7 +517,7 @@ async def check_patreon(self, ctx):
raise commands.CommandError(f"{ctx.author.name} ({ctx.author.id}) is not a Patron.")


# noinspection PyBroadException
# noinspection PyBroadException,PyPep8
class YTDLSource(discord.PCMVolumeTransformer):
def __init__(self, source, *, data, volume=0.1):
super().__init__(source, volume)
Expand Down
2 changes: 1 addition & 1 deletion module/Profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from module import logger as log


# noinspection PyBroadException
# noinspection PyBroadException,PyPep8
class Profile(commands.Cog):
def __init__(self):
ex.client.add_listener(self.profile_level, 'on_message')
Expand Down
2 changes: 1 addition & 1 deletion module/Reminder.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import discord


# noinspection PyBroadException
# noinspection PyBroadException,PyPep8
class Reminder(commands.Cog):
def __init__(self):
self.set_timezone_format = "settimezone (timezone abbreviation) (country code)"
Expand Down
1 change: 1 addition & 0 deletions module/Weverse.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from Utility import resources as ex


# noinspection PyPep8
class Weverse(commands.Cog):
def __init__(self):
self.current_notification_id = 0
Expand Down
2 changes: 1 addition & 1 deletion module/Wolfram.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import urllib.parse


# noinspection PyBroadException
# noinspection PyBroadException,PyPep8
class Wolfram(commands.Cog):
def __init__(self):
self.division_by_zero = "It is not possible to divide by zero."
Expand Down
5 changes: 3 additions & 2 deletions module/Youtube.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from Utility import resources as ex


# noinspection PyBroadException
# noinspection PyBroadException,PyPep8
class Youtube(commands.Cog):
def __init__(self):
self.current_yt_loop_instance = None
Expand Down Expand Up @@ -67,6 +67,7 @@ async def startloop(self, ctx, seconds=0):
await ctx.send("> **A loop is already running.**")


# noinspection PyBroadException,PyPep8
class YoutubeLoop:
@staticmethod
async def send_channel(channel_id, data):
Expand Down Expand Up @@ -95,7 +96,7 @@ async def scrape_videos():
await ex.conn.execute("INSERT INTO youtube.views(linkid, views, date) VALUES ($1,$2,$3)",
link_id, view_count, str(current_date))
await YoutubeLoop.send_channel(channel_id,
f"> **UPDATE FOR <{url}>: {view_count} -- {current_date}**")
f"> **UPDATE FOR <{url}>: {view_count} -- {current_date}**")
except Exception as e:
log.console(e)
log.console("Updated Video Views Tracker")
Expand Down
Loading