Updating the cdn replace function to include the authors name

This commit is contained in:
Luke Robles 2021-10-12 20:14:33 -07:00
parent b8d231eb2b
commit 83a0c2d097
35 changed files with 9 additions and 8 deletions

0
.gitignore vendored Normal file → Executable file
View File

0
.gitlab-ci.yml Normal file → Executable file
View File

0
.gitlab/merge_request_templates/merge_request.md Normal file → Executable file
View File

0
CONTRIBUTING.md Normal file → Executable file
View File

0
Dockerfile Normal file → Executable file
View File

0
Dockerfile-test-env Normal file → Executable file
View File

0
README.md Normal file → Executable file
View File

0
app/animals.py Normal file → Executable file
View File

0
app/bf5.py Normal file → Executable file
View File

View File

@ -44,7 +44,7 @@ def generate_embed(embed_url=None, embed_title=None, embed_description=None, emb
async def fix_cdn_url(ctx):
if 'media.discordapp.net' in ctx.content:
await ctx.delete()
await ctx.channel.send(ctx.content.replace('media.discordapp.net', 'cdn.discordapp.com'))
await ctx.channel.send("%s said:\n%s" % (ctx.author.mention, ctx.content.replace('media.discordapp.net', 'cdn.discordapp.com')))
return
@bot.listen('on_message')
@ -190,12 +190,12 @@ async def emoji(ctx):
emoji_staging = '/tmp/emoji'
try:
await ctx.send("emoji successfully uploaded! Heres how it looks in a sentence {}\nUse it with `:{}:`".format(
await ctx.message.guild.create_custom_emoji(
name=emoji_name,
image=open(core_utils.download_image(url, emoji_staging), "rb").read()
), emoji_name
)
)
await ctx.message.guild.create_custom_emoji(
name=emoji_name,
image=open(core_utils.download_image(url, emoji_staging), "rb").read()
), emoji_name
)
)
except Exception:
await ctx.send(
"I wasnt able to upload that image as an emoji. Sorry"

0
app/core_utils.py Normal file → Executable file
View File

0
app/corona.py Normal file → Executable file
View File

0
app/decide.py Normal file → Executable file
View File

0
app/define_word.py Normal file → Executable file
View File

0
app/dice.py Normal file → Executable file
View File

0
app/eight_ball.py Normal file → Executable file
View File

0
app/excuse.py Normal file → Executable file
View File

0
app/ffxiv.py Normal file → Executable file
View File

0
app/get_from_reddit.py Normal file → Executable file
View File

0
app/gitlab.py Normal file → Executable file
View File

0
app/help_methods.py Normal file → Executable file
View File

0
app/lewds.py Normal file → Executable file
View File

0
app/meme_gen.py Normal file → Executable file
View File

0
app/quake.py Normal file → Executable file
View File

0
app/questions.py Normal file → Executable file
View File

0
app/requirements.txt Normal file → Executable file
View File

0
app/river_stats.py Normal file → Executable file
View File

0
app/role_check.py Normal file → Executable file
View File

0
app/set_avatar.py Normal file → Executable file
View File

0
app/stock.py Normal file → Executable file
View File

0
app/tts.py Normal file → Executable file
View File

0
app/wallpaper.py Normal file → Executable file
View File

0
app/youtube.py Normal file → Executable file
View File

0
dragon-bot_old.py Normal file → Executable file
View File

View File

@ -6,5 +6,6 @@ printf "[+] Done\n"
# Run that shit and mount the docker socket so it can talk to the sky-factory container
printf "\n[-] Pulling latest build of container\n"
docker pull ldooks/dragon-bot:latest
docker run -d --name dragon-bot -v /mnt/freenas/docker_storage/syncthing/appdata/config/Sync/dale:/tmp/dale --env-file /mnt/freenas/docker_storage/dragon_bot_env --restart always ldooks/dragon-bot:latest
docker run -d --name dragon-bot -v /home/ldooks/Dropbox/dale:/tmp/dale --env-file /home/ldooks/Dropbox/code/my_projects/docker-containers/dragon-bot/dragon_bot_env --restart always ldooks/dragon-bot:latest
# docker run -d --name dragon-bot -v /mnt/freenas/docker_storage/syncthing/appdata/config/Sync/dale:/tmp/dale --env-file /mnt/freenas/docker_storage/dragon_bot_env --restart always ldooks/dragon-bot:latest
printf "[+] Done\n"