mirror of
https://github.com/Fluffy-Bean/Lynxie.git
synced 2025-05-31 15:53:14 +00:00
Shitload of new overlays
E621 search with blacklist
This commit is contained in:
parent
cc87c3e0ba
commit
960f452e4a
12 changed files with 179 additions and 14 deletions
|
@ -4,10 +4,10 @@ import discord
|
|||
from discord.ext import commands
|
||||
from discord.gateway import DiscordWebSocket
|
||||
|
||||
from lynxie.config import DISCORD_TOKEN, LYNXIE_PREFIX
|
||||
from lynxie.commands import Help, Ping, Hello, Music, Animals, Img
|
||||
from lynxie.config import DISCORD_TOKEN, LYNXIE_PREFIX, E621_BLACKLIST
|
||||
from lynxie.database import CommandHistory, Database
|
||||
from lynxie.utils import mobile_status
|
||||
from lynxie.commands import Help, Ping, Hello, Music, Animals, Img, E621
|
||||
|
||||
|
||||
db = Database()
|
||||
|
@ -22,9 +22,32 @@ lynxie = commands.Bot(
|
|||
@lynxie.event
|
||||
async def on_ready():
|
||||
print(f"Logged in as {lynxie.user} (ID: {lynxie.user.id})")
|
||||
print("------ Stats ------")
|
||||
print(f"Guilds: {len(lynxie.guilds)}")
|
||||
print(f"Users: {db.session.query(CommandHistory.user).distinct().count()}")
|
||||
|
||||
in_guilds = "In Guilds: " + str(len(lynxie.guilds))
|
||||
commands_used = "Commands called: " + str(
|
||||
db.session.query(CommandHistory.user).count()
|
||||
)
|
||||
unique_users = "Unique Users: " + str(
|
||||
db.session.query(CommandHistory.user).distinct().count()
|
||||
)
|
||||
blacklisted_words = "Blacklisted Words: " + str(len(E621_BLACKLIST))
|
||||
|
||||
bar_len = (
|
||||
max(
|
||||
len(in_guilds),
|
||||
len(commands_used),
|
||||
len(unique_users),
|
||||
len(blacklisted_words),
|
||||
)
|
||||
+ 4
|
||||
)
|
||||
|
||||
print("---- Stats " + "-" * (bar_len - 11))
|
||||
print(f"| {in_guilds}{' ' * (bar_len - len(in_guilds) - 3)}|")
|
||||
print(f"| {commands_used}{' ' * (bar_len - len(commands_used) - 3)}|")
|
||||
print(f"| {unique_users}{' ' * (bar_len - len(unique_users) - 3)}|")
|
||||
print(f"| {blacklisted_words}{' ' * (bar_len - len(blacklisted_words) - 3)}|")
|
||||
print("-" * bar_len)
|
||||
|
||||
|
||||
@lynxie.event
|
||||
|
@ -62,6 +85,7 @@ async def run():
|
|||
await lynxie.add_cog(Music(lynxie))
|
||||
await lynxie.add_cog(Animals(lynxie))
|
||||
await lynxie.add_cog(Img(lynxie))
|
||||
await lynxie.add_cog(E621(lynxie))
|
||||
await lynxie.start(DISCORD_TOKEN)
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue