connexions: test
This commit is contained in:
parent
3448d37237
commit
8a448834f8
@ -5,6 +5,7 @@ import math
|
|||||||
from redbot.core import commands
|
from redbot.core import commands
|
||||||
from redbot.core import Config, checks
|
from redbot.core import Config, checks
|
||||||
from discord import TextChannel
|
from discord import TextChannel
|
||||||
|
from discord.utils import escape_markdown
|
||||||
import discord
|
import discord
|
||||||
import traceback
|
import traceback
|
||||||
import requests
|
import requests
|
||||||
@ -373,7 +374,7 @@ class WynncraftCog(commands.Cog):
|
|||||||
if seconds > period_seconds:
|
if seconds > period_seconds:
|
||||||
period_value, seconds = divmod(seconds, period_seconds)
|
period_value, seconds = divmod(seconds, period_seconds)
|
||||||
has_s = 's' if period_value > 1 else ''
|
has_s = 's' if period_value > 1 else ''
|
||||||
strings.append("%s %s%s" % (period_value, period_name, has_s))
|
strings.append("%s %s%s" % (int(period_value), period_name, has_s))
|
||||||
break
|
break
|
||||||
|
|
||||||
return ", ".join(strings)
|
return ", ".join(strings)
|
||||||
@ -392,8 +393,8 @@ class WynncraftCog(commands.Cog):
|
|||||||
except:
|
except:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
connexions = {k: v for k, v in sorted(connexions.items(), key=lambda item: item[1], reverse=True)}
|
connexions = {k: v for k, v in sorted(connexions.items(), key=lambda item: item[1])}
|
||||||
await ctx.send("\n".join("%s: %s" % (key, td_format(val)) for (key, val) in connexions.items()))
|
await ctx.send("\n".join("**%s**: %s" % (key, td_format(val)) for (key, val) in connexions.items()))
|
||||||
|
|
||||||
@commands.command()
|
@commands.command()
|
||||||
@checks.admin_or_permissions(manage_guild=True)
|
@checks.admin_or_permissions(manage_guild=True)
|
||||||
|
Loading…
Reference in New Issue
Block a user