Updating mroe methods, re-adding the i have arrived message
This commit is contained in:
parent
6c39d300d4
commit
39a24f4022
66
app/bot.py
66
app/bot.py
@ -17,6 +17,18 @@ bot.remove_command("help")
|
|||||||
async def ping(ctx):
|
async def ping(ctx):
|
||||||
await ctx.send("pong")
|
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(
|
def generate_embed(
|
||||||
embed_url=None,
|
embed_url=None,
|
||||||
@ -69,15 +81,6 @@ async def fix_cdn_url(ctx):
|
|||||||
return
|
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")
|
@bot.listen("on_message")
|
||||||
async def based(ctx):
|
async def based(ctx):
|
||||||
if ctx.content.lower() == "based":
|
if ctx.content.lower() == "based":
|
||||||
@ -108,18 +111,6 @@ async def convert_heic_to_jpg(ctx):
|
|||||||
return
|
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")
|
@bot.command(name="shoo")
|
||||||
async def shoo(ctx):
|
async def shoo(ctx):
|
||||||
if ctx.message.author.id != 144986109804412928:
|
if ctx.message.author.id != 144986109804412928:
|
||||||
@ -225,16 +216,8 @@ async def excuse(ctx):
|
|||||||
|
|
||||||
|
|
||||||
@bot.command(name="emoji")
|
@bot.command(name="emoji")
|
||||||
async def emoji(ctx):
|
async def emoji(ctx, url, emoji_name):
|
||||||
await ctx.message.delete()
|
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
|
import core_utils
|
||||||
|
|
||||||
emoji_staging = "/tmp/emoji"
|
emoji_staging = "/tmp/emoji"
|
||||||
@ -257,21 +240,14 @@ async def emoji(ctx):
|
|||||||
|
|
||||||
|
|
||||||
@bot.command(name="avatar")
|
@bot.command(name="avatar")
|
||||||
async def avatar(ctx):
|
async def avatar(ctx, user: discord.Member):
|
||||||
profile = [ctx.message.author]
|
await ctx.send(
|
||||||
if len(ctx.message.mentions):
|
embed=generate_embed(
|
||||||
profile = ctx.message.mentions
|
embed_title="{}#{}".format(user.name, user.discriminator),
|
||||||
|
embed_url=user.avatar,
|
||||||
# Code stolen from this reddit post
|
embed_description="[Direct Link]({})".format(user.avatar),
|
||||||
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),
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
@bot.command(name="meme")
|
@bot.command(name="meme")
|
||||||
@ -724,7 +700,7 @@ async def info(ctx):
|
|||||||
name="Servers using %s" % bot.user.name,
|
name="Servers using %s" % bot.user.name,
|
||||||
value="\n".join(x.name for x in bot.guilds),
|
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)
|
await ctx.send(embed=embed)
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@ image:
|
|||||||
repository: ldooks/dragon-bot
|
repository: ldooks/dragon-bot
|
||||||
pullPolicy: IfNotPresent
|
pullPolicy: IfNotPresent
|
||||||
# Overrides the image tag whose default is the chart appVersion.
|
# Overrides the image tag whose default is the chart appVersion.
|
||||||
tag: "154"
|
tag: "155"
|
||||||
|
|
||||||
imagePullSecrets: []
|
imagePullSecrets: []
|
||||||
nameOverride: ""
|
nameOverride: ""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user