|
|
@ -136,11 +136,23 @@ class GetInfo(commands.Cog):
|
|
|
|
# Display all the emojis in the server as it is less than 20
|
|
|
|
# Display all the emojis in the server as it is less than 20
|
|
|
|
emojis = " ".join(map(str, ctx.guild.emojis))
|
|
|
|
emojis = " ".join(map(str, ctx.guild.emojis))
|
|
|
|
|
|
|
|
|
|
|
|
# Define the statuses of the members within the discord
|
|
|
|
# Defining a dictionary of the statuses
|
|
|
|
statuses = [len(list(filter(lambda m: str(m.status) == "online", ctx.guild.members))),
|
|
|
|
member_status = {
|
|
|
|
len(list(filter(lambda m: str(m.status) == "idle", ctx.guild.members))),
|
|
|
|
"online": 0,
|
|
|
|
len(list(filter(lambda m: str(m.status) == "dnd", ctx.guild.members))),
|
|
|
|
"idle": 0,
|
|
|
|
len(list(filter(lambda m: str(m.status) == "offline", ctx.guild.members)))]
|
|
|
|
"dnd": 0,
|
|
|
|
|
|
|
|
"offline": 0
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Iterating over the members and then storing the numbers in the dictionary
|
|
|
|
|
|
|
|
for m in ctx.guild.members:
|
|
|
|
|
|
|
|
member_status[str(m.status)] += 1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Storing the statuses in an array
|
|
|
|
|
|
|
|
statuses = [member_status["online"],
|
|
|
|
|
|
|
|
member_status["idle"],
|
|
|
|
|
|
|
|
member_status["dnd"],
|
|
|
|
|
|
|
|
member_status["offline"]]
|
|
|
|
|
|
|
|
|
|
|
|
# Set up embed to display all the server information
|
|
|
|
# Set up embed to display all the server information
|
|
|
|
embed = Embed(title="**Server Information**",
|
|
|
|
embed = Embed(title="**Server Information**",
|
|
|
|