diff --git a/main.py b/main.py index 69a5b302..0f3a6566 100644 --- a/main.py +++ b/main.py @@ -1,5 +1,6 @@ import asyncio import datetime +import random from contextlib import closing from typing import Optional @@ -8,7 +9,7 @@ import mariadb from decouple import config from discord import Embed from discord.ext import commands, tasks -from discord.ext.commands import when_mentioned_or, is_owner, guild_only, has_permissions +from discord.ext.commands import when_mentioned_or, is_owner, guild_only, has_permissions, cooldown, BucketType import db import settings @@ -167,6 +168,15 @@ async def leave(ctx): await ctx.guild.leave() +@client.command() +@guild_only() +@cooldown(1, 300, BucketType.guild) +async def someone(ctx): + """Tags Someone Randomly in the Server""" + + await ctx.send(random.choice(tuple(member.mention for member in ctx.guild.members if not member.bot))) + + @client.command(name='help') async def _help(ctx, *, command: str = None): """Shows help about a command or the bot"""