|
|
@ -11,7 +11,7 @@ from discord import Embed, Intents
|
|
|
|
from discord.ext import commands
|
|
|
|
from discord.ext import commands
|
|
|
|
from settings.config import IMAGE_TYPES, OW_API_CONFIG, PERMISSIONS
|
|
|
|
from settings.config import IMAGE_TYPES, OW_API_CONFIG, PERMISSIONS
|
|
|
|
|
|
|
|
|
|
|
|
from utils.database import (count_quotes, get_by_id, get_quote_contains,
|
|
|
|
from utils.database import (count_quotes, count_quotes_user, get_by_id, get_quote_contains,
|
|
|
|
get_quotes, remove_quote, set_quote)
|
|
|
|
get_quotes, remove_quote, set_quote)
|
|
|
|
from utils.machine_monitor import Monitor
|
|
|
|
from utils.machine_monitor import Monitor
|
|
|
|
from utils.news_paper import News
|
|
|
|
from utils.news_paper import News
|
|
|
@ -363,4 +363,18 @@ async def neofetch(bot: object) -> str:
|
|
|
|
os.system('neofetch --stdout --disable gpu --disable shell --disable packages --disable resolution --cpu_temp C > /tmp/neofetch')
|
|
|
|
os.system('neofetch --stdout --disable gpu --disable shell --disable packages --disable resolution --cpu_temp C > /tmp/neofetch')
|
|
|
|
nfetch = open('/tmp/neofetch', mode='r')
|
|
|
|
nfetch = open('/tmp/neofetch', mode='r')
|
|
|
|
nfetch = nfetch.read()
|
|
|
|
nfetch = nfetch.read()
|
|
|
|
return await bot.send("```\n" + nfetch + "\n```")
|
|
|
|
return await bot.send("```\n" + nfetch + "\n```")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@client.command(aliases=['qlb'])
|
|
|
|
|
|
|
|
async def count_leaderboard(bot:object):
|
|
|
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
Returns a list of quoters, sorted by amount of quotes.
|
|
|
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
qlb = "```\nLista de quoteiros\n"
|
|
|
|
|
|
|
|
lis = count_quotes_user()
|
|
|
|
|
|
|
|
lis = sorted(lis, key=lambda lis: lis[1], reverse=True)
|
|
|
|
|
|
|
|
for data in lis:
|
|
|
|
|
|
|
|
qlb = qlb + data[0] + " - " + str(data[1]) + "\n"
|
|
|
|
|
|
|
|
qlb = qlb + "```"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return await bot.send(qlb)
|