someone command allows for a random person in the server to be tagged

pull/8/head
sgoudham 4 years ago
parent bfce2b749d
commit 98c33c83e7

@ -1,5 +1,6 @@
import asyncio import asyncio
import datetime import datetime
import random
from contextlib import closing from contextlib import closing
from typing import Optional from typing import Optional
@ -8,7 +9,7 @@ import mariadb
from decouple import config from decouple import config
from discord import Embed from discord import Embed
from discord.ext import commands, tasks 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 db
import settings import settings
@ -167,6 +168,15 @@ async def leave(ctx):
await ctx.guild.leave() 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') @client.command(name='help')
async def _help(ctx, *, command: str = None): async def _help(ctx, *, command: str = None):
"""Shows help about a command or the bot""" """Shows help about a command or the bot"""

Loading…
Cancel
Save