Add business card reply, switch the number we tag the container with to an IID (unique per project)

This commit is contained in:
Luke Robles 2022-05-21 16:29:35 -07:00
parent 48df183fb7
commit fd971491ea
4 changed files with 13 additions and 8 deletions

View File

@ -37,9 +37,9 @@ build_and_push_container:
- echo "Wait for Docker daemon at tcp://localhost:2375"
- while ! nc -z localhost 2375; do sleep 0.1; done # Wait until docker socket is available
- docker login -u ldooks -p $DOCKER_ACCESS_TOKEN
- docker build -t ldooks/dragon-bot:$CI_PIPELINE_ID -t ldooks/dragon-bot:latest .
- docker build -t ldooks/dragon-bot:$CI_PIPELINE_IID -t ldooks/dragon-bot:latest .
- docker push ldooks/dragon-bot:latest
- docker push ldooks/dragon-bot:$CI_PIPELINE_ID
- docker push ldooks/dragon-bot:$CI_PIPELINE_IID
rules:
- changes:
- app/**/*

View File

@ -1,7 +1,8 @@
#!/usr/local/bin/python
import os
import discord
from discord.ext import commands
import discord
import os
import random
intents = discord.Intents.default()
intents.message_content = True
@ -50,9 +51,13 @@ async def fix_cdn_url(ctx):
@bot.listen("on_message")
async def based(ctx):
if ctx.content.lower() == "based":
await ctx.reply("https://i.imgur.com/MejGa23.jpeg")
async def business_card_scene_reploy(ctx):
# if it has an attachment or a link
if ctx.attachments or "https://" in ctx.content:
if random.randint(0, 9) == 0:
await ctx.reply(
"Jesus. This is really super. How'd a nitwit like you get so tasteful?"
)
@bot.listen("on_message")

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

View File

@ -6,7 +6,7 @@ replicaCount: 1
image:
# Overrides the image tag whose default is the chart appVersion.
tag: "205"
tag: "144"
repository: ldooks/dragon-bot
pullPolicy: IfNotPresent