From 05545b4ea15f8248a82aede6d7d87b903e6ec92f Mon Sep 17 00:00:00 2001 From: Luke Robles Date: Tue, 12 Oct 2021 20:14:33 -0700 Subject: [PATCH] Updating the cdn replace function to include the authors name --- .gitignore | 0 .gitlab-ci.yml | 0 .gitlab/merge_request_templates/merge_request.md | 0 CONTRIBUTING.md | 0 Dockerfile | 0 Dockerfile-test-env | 0 README.md | 0 app/animals.py | 0 app/bf5.py | 0 app/bot.py | 14 +++++++------- app/core_utils.py | 0 app/corona.py | 0 app/decide.py | 0 app/define_word.py | 0 app/dice.py | 0 app/eight_ball.py | 0 app/excuse.py | 0 app/ffxiv.py | 0 app/get_from_reddit.py | 0 app/gitlab.py | 0 app/help_methods.py | 0 app/lewds.py | 0 app/meme_gen.py | 0 app/quake.py | 0 app/questions.py | 0 app/requirements.txt | 0 app/river_stats.py | 0 app/role_check.py | 0 app/set_avatar.py | 0 app/stock.py | 0 app/tts.py | 0 app/wallpaper.py | 0 app/youtube.py | 0 dragon-bot_old.py | 0 pull_and_run_latest.sh | 3 ++- 35 files changed, 9 insertions(+), 8 deletions(-) mode change 100644 => 100755 .gitignore mode change 100644 => 100755 .gitlab-ci.yml mode change 100644 => 100755 .gitlab/merge_request_templates/merge_request.md mode change 100644 => 100755 CONTRIBUTING.md mode change 100644 => 100755 Dockerfile mode change 100644 => 100755 Dockerfile-test-env mode change 100644 => 100755 README.md mode change 100644 => 100755 app/animals.py mode change 100644 => 100755 app/bf5.py mode change 100644 => 100755 app/core_utils.py mode change 100644 => 100755 app/corona.py mode change 100644 => 100755 app/decide.py mode change 100644 => 100755 app/define_word.py mode change 100644 => 100755 app/dice.py mode change 100644 => 100755 app/eight_ball.py mode change 100644 => 100755 app/excuse.py mode change 100644 => 100755 app/ffxiv.py mode change 100644 => 100755 app/get_from_reddit.py mode change 100644 => 100755 app/gitlab.py mode change 100644 => 100755 app/help_methods.py mode change 100644 => 100755 app/lewds.py mode change 100644 => 100755 app/meme_gen.py mode change 100644 => 100755 app/quake.py mode change 100644 => 100755 app/questions.py mode change 100644 => 100755 app/requirements.txt mode change 100644 => 100755 app/river_stats.py mode change 100644 => 100755 app/role_check.py mode change 100644 => 100755 app/set_avatar.py mode change 100644 => 100755 app/stock.py mode change 100644 => 100755 app/tts.py mode change 100644 => 100755 app/wallpaper.py mode change 100644 => 100755 app/youtube.py mode change 100644 => 100755 dragon-bot_old.py diff --git a/.gitignore b/.gitignore old mode 100644 new mode 100755 diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml old mode 100644 new mode 100755 diff --git a/.gitlab/merge_request_templates/merge_request.md b/.gitlab/merge_request_templates/merge_request.md old mode 100644 new mode 100755 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md old mode 100644 new mode 100755 diff --git a/Dockerfile b/Dockerfile old mode 100644 new mode 100755 diff --git a/Dockerfile-test-env b/Dockerfile-test-env old mode 100644 new mode 100755 diff --git a/README.md b/README.md old mode 100644 new mode 100755 diff --git a/app/animals.py b/app/animals.py old mode 100644 new mode 100755 diff --git a/app/bf5.py b/app/bf5.py old mode 100644 new mode 100755 diff --git a/app/bot.py b/app/bot.py index 92fed828..a80d40ac 100755 --- a/app/bot.py +++ b/app/bot.py @@ -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" diff --git a/app/core_utils.py b/app/core_utils.py old mode 100644 new mode 100755 diff --git a/app/corona.py b/app/corona.py old mode 100644 new mode 100755 diff --git a/app/decide.py b/app/decide.py old mode 100644 new mode 100755 diff --git a/app/define_word.py b/app/define_word.py old mode 100644 new mode 100755 diff --git a/app/dice.py b/app/dice.py old mode 100644 new mode 100755 diff --git a/app/eight_ball.py b/app/eight_ball.py old mode 100644 new mode 100755 diff --git a/app/excuse.py b/app/excuse.py old mode 100644 new mode 100755 diff --git a/app/ffxiv.py b/app/ffxiv.py old mode 100644 new mode 100755 diff --git a/app/get_from_reddit.py b/app/get_from_reddit.py old mode 100644 new mode 100755 diff --git a/app/gitlab.py b/app/gitlab.py old mode 100644 new mode 100755 diff --git a/app/help_methods.py b/app/help_methods.py old mode 100644 new mode 100755 diff --git a/app/lewds.py b/app/lewds.py old mode 100644 new mode 100755 diff --git a/app/meme_gen.py b/app/meme_gen.py old mode 100644 new mode 100755 diff --git a/app/quake.py b/app/quake.py old mode 100644 new mode 100755 diff --git a/app/questions.py b/app/questions.py old mode 100644 new mode 100755 diff --git a/app/requirements.txt b/app/requirements.txt old mode 100644 new mode 100755 diff --git a/app/river_stats.py b/app/river_stats.py old mode 100644 new mode 100755 diff --git a/app/role_check.py b/app/role_check.py old mode 100644 new mode 100755 diff --git a/app/set_avatar.py b/app/set_avatar.py old mode 100644 new mode 100755 diff --git a/app/stock.py b/app/stock.py old mode 100644 new mode 100755 diff --git a/app/tts.py b/app/tts.py old mode 100644 new mode 100755 diff --git a/app/wallpaper.py b/app/wallpaper.py old mode 100644 new mode 100755 diff --git a/app/youtube.py b/app/youtube.py old mode 100644 new mode 100755 diff --git a/dragon-bot_old.py b/dragon-bot_old.py old mode 100644 new mode 100755 diff --git a/pull_and_run_latest.sh b/pull_and_run_latest.sh index 90bfe004..791cb8e4 100755 --- a/pull_and_run_latest.sh +++ b/pull_and_run_latest.sh @@ -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"