reformat/refactor
This commit is contained in:
@ -2,7 +2,6 @@ import traceback
|
||||
import logging
|
||||
from typing import Optional, Union
|
||||
from regex import Pattern
|
||||
import urllib
|
||||
import discord
|
||||
import regex
|
||||
from util.sing_util import Utility
|
||||
@ -30,10 +29,11 @@ class Sing(commands.Cog):
|
||||
|
||||
def predicate(ctx):
|
||||
try:
|
||||
if not ctx.channel.id in BOT_CHANIDS:
|
||||
if ctx.channel.id not in BOT_CHANIDS:
|
||||
logging.debug("%s not found in %s", ctx.channel.id, BOT_CHANIDS)
|
||||
return ctx.channel.id in BOT_CHANIDS
|
||||
except:
|
||||
except Exception as e:
|
||||
logging.debug("Exception: %s", str(e))
|
||||
traceback.print_exc()
|
||||
return False
|
||||
|
||||
@ -103,7 +103,7 @@ class Sing(commands.Cog):
|
||||
search_result_wrapped_short: list[str] = search_result[
|
||||
2
|
||||
] # Third is short wrapped lyrics
|
||||
if not ctx.channel.id in BOT_CHANIDS:
|
||||
if ctx.channel.id not in BOT_CHANIDS:
|
||||
short_lyrics = " ".join(
|
||||
search_result_wrapped_short
|
||||
) # Replace with shortened lyrics for non spamchans
|
||||
|
Reference in New Issue
Block a user