Compare commits
No commits in common. "f3605668242011c4005bd032ab859b2f3b8e222f" and "062676df264bae3f72858c970f28f3a43e181ea1" have entirely different histories.
f360566824
...
062676df26
@ -14,13 +14,13 @@ async def lookup(message):
|
||||
tokens = commands.tokenize(message.content)
|
||||
parser = arguments.ArgumentParser(
|
||||
tokens[0],
|
||||
"look up a discord user or application by ID",
|
||||
"look up a user or application on discord by their ID",
|
||||
)
|
||||
parser.add_argument(
|
||||
"-a",
|
||||
"--application",
|
||||
action="store_true",
|
||||
help="look up applications instead of users",
|
||||
help="search for applications instead of users",
|
||||
)
|
||||
parser.add_argument(
|
||||
"id",
|
||||
|
@ -24,12 +24,6 @@ SPONSORBLOCK_CATEGORY_NAMES = {
|
||||
"selfpromo": "self promotion",
|
||||
"sponsor": "sponsored",
|
||||
}
|
||||
REACTIONS = {
|
||||
"cat": ["🐈"],
|
||||
"dog": ["🐕"],
|
||||
"gn": ["💤", "😪", "😴", "🛌"],
|
||||
"pizza": ["🍕"],
|
||||
}
|
||||
RELOADABLE_MODULES = [
|
||||
"arguments",
|
||||
"audio",
|
||||
|
7
core.py
7
core.py
@ -166,7 +166,6 @@ async def on_voice_state_update(_, before, after):
|
||||
channel = before.channel
|
||||
elif is_empty(after.channel):
|
||||
channel = after.channel
|
||||
|
||||
if channel:
|
||||
await channel.guild.voice_client.disconnect()
|
||||
|
||||
@ -175,9 +174,9 @@ def rreload(reloaded_modules, module):
|
||||
reloaded_modules.add(module.__name__)
|
||||
|
||||
for submodule in filter(
|
||||
lambda sm: inspect.ismodule(sm)
|
||||
and sm.__name__ in RELOADABLE_MODULES
|
||||
and sm.__name__ not in reloaded_modules,
|
||||
lambda v: inspect.ismodule(v)
|
||||
and v.__name__ in RELOADABLE_MODULES
|
||||
and v.__name__ not in reloaded_modules,
|
||||
vars(module).values(),
|
||||
):
|
||||
rreload(reloaded_modules, submodule)
|
||||
|
11
fun.py
11
fun.py
@ -1,13 +1,10 @@
|
||||
import random
|
||||
|
||||
import commands
|
||||
from constants import REACTIONS
|
||||
|
||||
|
||||
async def on_message(message):
|
||||
if random.random() < 0.01:
|
||||
tokens = commands.tokenize(message.content, remove_prefix=False)
|
||||
for keyword, options in REACTIONS.items():
|
||||
if keyword in tokens:
|
||||
await message.add_reaction(random.choice(options))
|
||||
break
|
||||
if random.random() < 0.01 and "gn" in commands.tokenize(
|
||||
message.content, remove_prefix=False
|
||||
):
|
||||
await message.add_reaction(random.choice(["💤", "😪", "😴", "🛌"]))
|
||||
|
Loading…
x
Reference in New Issue
Block a user