parent
a5d8988201
commit
858ccb6b2a
@ -3,12 +3,11 @@ RUN apt-get update && apt-get install -y gcc make automake
|
|||||||
# RUN apk update && apk add --no-cache make python3-dev automake gcc libxml2-dev libxslt-dev g++
|
# RUN apk update && apk add --no-cache make python3-dev automake gcc libxml2-dev libxslt-dev g++
|
||||||
ADD app/requirements.txt /requirements.txt
|
ADD app/requirements.txt /requirements.txt
|
||||||
RUN pip install -r requirements.txt
|
RUN pip install -r requirements.txt
|
||||||
RUN pip install pylint
|
# RUN pip install pylint
|
||||||
ADD app /app
|
# ADD app /app
|
||||||
RUN printf "\n\nTesting your python code for errors\n\n" && \
|
# RUN printf "\n\nTesting your python code for errors\n\n" && \
|
||||||
pylint -E /app/*.py
|
# pylint -E /app/*.py
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
RUN printf "\n#########################\n Run dragon bot by typing \n python bot.py\n#########################\n\n"
|
# RUN printf "\n#########################\n Run dragon bot by typing \n python bot.py\n#########################\n\n"
|
||||||
RUN chmod +x /app/bot.py
|
# CMD python /app/bot.py
|
||||||
CMD python /app/bot.py
|
|
||||||
|
52
app/bot.py
Normal file → Executable file
52
app/bot.py
Normal file → Executable file
@ -1,6 +1,7 @@
|
|||||||
#!/usr/local/bin/python
|
#!/usr/local/bin/python
|
||||||
import os
|
import os
|
||||||
import random
|
import random
|
||||||
|
import requests
|
||||||
|
|
||||||
import discord
|
import discord
|
||||||
from discord.ext import commands
|
from discord.ext import commands
|
||||||
@ -85,6 +86,57 @@ async def help(ctx):
|
|||||||
embed=help_methods.get_help_embed(bot)
|
embed=help_methods.get_help_embed(bot)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@bot.command(name='wink')
|
||||||
|
async def wink(ctx):
|
||||||
|
await ctx.send(
|
||||||
|
embed=generate_embed(
|
||||||
|
embed_url=requests.get('https://some-random-api.ml/animu/wink').json()['link']
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
@bot.command(name='smug')
|
||||||
|
async def smug(ctx):
|
||||||
|
import get_from_reddit
|
||||||
|
await ctx.send(embed=generate_embed(embed_url=get_from_reddit.get_image('smuganimegirls')))
|
||||||
|
|
||||||
|
@bot.command(name='pout')
|
||||||
|
async def pout(ctx):
|
||||||
|
import get_from_reddit
|
||||||
|
await ctx.send(embed=generate_embed(embed_url=get_from_reddit.get_image('pouts')))
|
||||||
|
|
||||||
|
|
||||||
|
@bot.command(name='roll')
|
||||||
|
async def roll(ctx):
|
||||||
|
import dice
|
||||||
|
await ctx.send(embed=dice.parse_message(ctx.message.content))
|
||||||
|
|
||||||
|
@bot.command(name='quake')
|
||||||
|
async def quake(ctx):
|
||||||
|
import quake
|
||||||
|
await ctx.send(embed=quake.parse_message(ctx.message))
|
||||||
|
|
||||||
|
@bot.command(name='excuse')
|
||||||
|
async def excuse(ctx):
|
||||||
|
import excuse
|
||||||
|
await ctx.send(excuse.get_excuse())
|
||||||
|
|
||||||
|
@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
|
||||||
|
# https://www.reddit.com/r/discordapp/comments/74bb4z/retrieve_a_mentioned_users_avatar_using_discordpy
|
||||||
|
for user in profile:
|
||||||
|
await ctx.send(
|
||||||
|
embed=generate_embed(
|
||||||
|
embed_title="{}#{}".format(user.name, user.discriminator),
|
||||||
|
embed_url=str(user.avatar_url).replace('.webp', '.png'),
|
||||||
|
embed_description="[Direct Link]({})".format(str(user.avatar_url).replace('.webp', '.png'))
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
@bot.command(name='redpanda')
|
@bot.command(name='redpanda')
|
||||||
async def redpanda(ctx):
|
async def redpanda(ctx):
|
||||||
|
|
||||||
|
@ -6,4 +6,4 @@ printf "[+] Done\n"
|
|||||||
printf "\n[-] Running dragon bot in test mode\n"
|
printf "\n[-] Running dragon bot in test mode\n"
|
||||||
docker build -f ./Dockerfile-test-env -t dragon-bot-test . || exit
|
docker build -f ./Dockerfile-test-env -t dragon-bot-test . || exit
|
||||||
|
|
||||||
docker run -ti --rm --name dragon-bot-test -e DRAGON_ENV=test -e token="MzQ1MjkwMTI5OTQ4Mjc4Nzg0.DG5IBw._9umb82PrL22bPe7GjmHClU-NtU" dragon-bot-test sh
|
docker run -ti -v $(pwd)/app:/app --rm --name dragon-bot-test -e DRAGON_ENV=test -e token="MzQ1MjkwMTI5OTQ4Mjc4Nzg0.DG5IBw._9umb82PrL22bPe7GjmHClU-NtU" dragon-bot-test sh
|
||||||
|
Loading…
x
Reference in New Issue
Block a user