Updating mroe methods, re-adding the i have arrived message
This commit is contained in:
parent
b304e9937b
commit
168f933224
66
app/bot.py
66
app/bot.py
@ -17,6 +17,18 @@ bot.remove_command("help")
|
||||
async def ping(ctx):
|
||||
await ctx.send("pong")
|
||||
|
||||
@bot.event
|
||||
async def on_ready():
|
||||
print(f"{bot.user.name} has connected to Discord!")
|
||||
game = discord.Game("Type !help")
|
||||
await bot.change_presence(
|
||||
status=discord.Status.online,
|
||||
activity=discord.Activity(
|
||||
type=discord.ActivityType.listening, name="type !help"
|
||||
),
|
||||
)
|
||||
await bot.get_channel(152921472304676865).send("I have reconnected")
|
||||
|
||||
|
||||
def generate_embed(
|
||||
embed_url=None,
|
||||
@ -69,15 +81,6 @@ async def fix_cdn_url(ctx):
|
||||
return
|
||||
|
||||
|
||||
# @bot.listen('on_message')
|
||||
# async def react_with_dale(ctx):
|
||||
# if 'dale' in ctx.content.lower():
|
||||
# emoji = discord.utils.get(ctx.guild.emojis, name='dale')
|
||||
# if emoji:
|
||||
# await ctx.add_reaction(emoji)
|
||||
# return
|
||||
|
||||
|
||||
@bot.listen("on_message")
|
||||
async def based(ctx):
|
||||
if ctx.content.lower() == "based":
|
||||
@ -108,18 +111,6 @@ async def convert_heic_to_jpg(ctx):
|
||||
return
|
||||
|
||||
|
||||
@bot.event
|
||||
async def on_ready():
|
||||
print(f"{bot.user.name} has connected to Discord!")
|
||||
game = discord.Game("Type !help")
|
||||
await bot.change_presence(
|
||||
status=discord.Status.online,
|
||||
activity=discord.Activity(
|
||||
type=discord.ActivityType.listening, name="type !help"
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
@bot.command(name="shoo")
|
||||
async def shoo(ctx):
|
||||
if ctx.message.author.id != 144986109804412928:
|
||||
@ -225,16 +216,8 @@ async def excuse(ctx):
|
||||
|
||||
|
||||
@bot.command(name="emoji")
|
||||
async def emoji(ctx):
|
||||
async def emoji(ctx, url, emoji_name):
|
||||
await ctx.message.delete()
|
||||
try:
|
||||
command, url, emoji_name = ctx.message.content.split()
|
||||
except Exception:
|
||||
import help_methods
|
||||
|
||||
await ctx.send(help_methods.get_help_message("emoji"))
|
||||
return
|
||||
|
||||
import core_utils
|
||||
|
||||
emoji_staging = "/tmp/emoji"
|
||||
@ -257,21 +240,14 @@ async def emoji(ctx):
|
||||
|
||||
|
||||
@bot.command(name="avatar")
|
||||
async def avatar(ctx):
|
||||
profile = [ctx.message.author]
|
||||
if len(ctx.message.mentions):
|
||||
profile = ctx.message.mentions
|
||||
|
||||
# Code stolen from this reddit post
|
||||
for user in profile:
|
||||
avatar_url = user.avatar_url_as(static_format="png")
|
||||
await ctx.send(
|
||||
embed=generate_embed(
|
||||
embed_title="{}#{}".format(user.name, user.discriminator),
|
||||
embed_url=avatar_url,
|
||||
embed_description="[Direct Link]({})".format(avatar_url),
|
||||
)
|
||||
async def avatar(ctx, user: discord.Member):
|
||||
await ctx.send(
|
||||
embed=generate_embed(
|
||||
embed_title="{}#{}".format(user.name, user.discriminator),
|
||||
embed_url=user.avatar,
|
||||
embed_description="[Direct Link]({})".format(user.avatar),
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@bot.command(name="meme")
|
||||
@ -724,7 +700,7 @@ async def info(ctx):
|
||||
name="Servers using %s" % bot.user.name,
|
||||
value="\n".join(x.name for x in bot.guilds),
|
||||
)
|
||||
embed.set_thumbnail(url=server.icon_url)
|
||||
embed.set_thumbnail(url=server.icon)
|
||||
|
||||
await ctx.send(embed=embed)
|
||||
|
||||
|
@ -8,7 +8,7 @@ image:
|
||||
repository: ldooks/dragon-bot
|
||||
pullPolicy: IfNotPresent
|
||||
# Overrides the image tag whose default is the chart appVersion.
|
||||
tag: "154"
|
||||
tag: "155"
|
||||
|
||||
imagePullSecrets: []
|
||||
nameOverride: ""
|
||||
|
Loading…
x
Reference in New Issue
Block a user