Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions whois/whois.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,36 @@ class WhoIs(BaseCog):
def __init__(self, bot_instance):
self.bot: bot = bot_instance


@commands.command()
async def iseveryone(self, ctx):
con = sq.connect(WHOFILE)
cursor = con.cursor()
cursor.execute("SELECT userid, name " "FROM usernames")
results = cursor.fetchall()
results = [
(ctx.guild.get_member(int(userid)), name) for userid, name in results
]

max_character = 2000
msg_size = 0
msg = ""
for (mention, name) in results:
if mention is not "None":
to_append = "{} is {}\n".format(mention, name)
characters += len(to_append)
if characters >= CHAR_LIMIT:
await ctx.send(msg)
msg = to_append
characters = len(to_append)
else:
msg += to_append
if msg is not "":
await ctx.send(msg)
con.close()
data_dir = data_manager.bundled_data_path(self)


self.config = Config.get_conf(
self,
identifier=746578326459283047523,
Expand Down