mirror of
https://github.com/SpiceBot/SpiceBot.git
synced 2026-11-11 06:00:59 -05:00
test
This commit is contained in:
parent
d59767fa0f
commit
c1ea074761
@ -21,10 +21,7 @@ def bot_command_rule(bot, trigger):
|
||||
if not len(trigger.args):
|
||||
return
|
||||
|
||||
message = str(trigger.args[1]).encode('utf-8', 'replace')
|
||||
|
||||
if is_ascii(message):
|
||||
return
|
||||
message = str(trigger.args[1]).decode('utf-8')
|
||||
|
||||
# ignore text coming from a valid prefix
|
||||
if str(message).startswith(tuple(bot.config.core.prefix_list)):
|
||||
@ -89,12 +86,3 @@ def bot_command_rule(bot, trigger):
|
||||
else:
|
||||
bot.osd("I don't know what you are asking me to do!")
|
||||
return
|
||||
|
||||
|
||||
def is_ascii(s):
|
||||
try:
|
||||
s.decode('ascii')
|
||||
except UnicodeDecodeError:
|
||||
return False
|
||||
else:
|
||||
return True
|
||||
|
||||
Loading…
Reference in New Issue
Block a user