Skip to content

Commit

Permalink
Drop and Clip Update #2 (#202)
Browse files Browse the repository at this point in the history
* updated drops, now uses drop/clip description in autocomplete as well

* added a few clips

Co-authored-by: jp00p <asimovsghost@gmail.com>
  • Loading branch information
zmattingly and jp00p committed Jul 26, 2022
1 parent af60009 commit e15841a
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 10 deletions.
4 changes: 2 additions & 2 deletions charts/agimus/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ apiVersion: v2
name: agimus
description: A helm chart for a discord bot that also runs a mysql db
type: application
version: v1.2.1
appVersion: v1.2.1
version: v1.2.2
appVersion: v1.2.2
10 changes: 8 additions & 2 deletions commands/clip.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,14 @@
f.close()

async def clip_autocomplete(ctx:discord.AutocompleteContext):
clip_keys = clip_data.keys()
return [key for key in clip_keys if ctx.value.lower() in key.lower()]
results = []
for clip_key in clip_data.keys():
clip_info = clip_data[clip_key]
clip_description = clip_info["description"]
if ctx.value.lower() in clip_key.lower() or ctx.value.lower() in clip_description:
results.append(clip_key)

return results

# Create drop Slash Command Group
clip = bot.create_group("clip", "Clip Commands!")
Expand Down
11 changes: 8 additions & 3 deletions commands/drop.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,14 @@
f.close()

async def drop_autocomplete(ctx:discord.AutocompleteContext):
drop_keys = drop_data.keys()
return [key for key in drop_keys if ctx.value.lower() in key.lower()]
# return drop_data.keys()
results = []
for drop_key in drop_data.keys():
drop_info = drop_data[drop_key]
drop_description = drop_info["description"]
if ctx.value.lower() in drop_key.lower() or ctx.value.lower() in drop_description:
results.append(drop_key)

return results

# Create drop Slash Command Group
drop = bot.create_group("drop", "Drop Commands!")
Expand Down
19 changes: 17 additions & 2 deletions data/clips.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,27 @@
{
"AGIMUS Reigns!": {
"file": "data/clips/agimusreigns.mp4",
"description": "AGIMUS reigns with this ship's materials I will produce a whole fleet of murder drones this planet nay this system will be mine you fool you trusted me",
"url": "https://i.imgur.com/uiacPCt.mp4"
},
"AGIMUS YESSS!": {
"file": "data/clips/agimusyes.mp4",
"description": "AGIMUS yes",
"url": "https://i.imgur.com/KxfDkTT.mp4"
},
"Data - It Is Green!": {
"file": "data/clips/dataitisgreen.mp4",
"description": "Data it is green",
"url": "https://i.imgur.com/d1bZLNC.mp4"
},
"Data - It Is Revolting!": {
"file": "data/clips/dataitisrevolting.mp4",
"description": "Data it is its revolting green",
"description": "Data it is its revolting",
"url": "https://i.imgur.com/I9mvDej.mp4"
},
"Data - Oh Shit!": {
"file": "data/clips/dataohshit.mp4",
"description": "Data Ohhhh Shit!",
"description": "Data Ohhhh Shit",
"url": "https://i.imgur.com/GH7Dy2J.mp4"
},
"Data - Yesss!": {
Expand Down Expand Up @@ -44,6 +54,11 @@
"description": "Picard Damn You",
"url": "https://i.imgur.com/vuDmv7F.mp4"
},
"Picard - Get Off My Bridge": {
"file": "data/clips/picardgetoffmybridge.mp4",
"description": "Picard get off my bridge",
"url": "https://i.imgur.com/ZABuj44.mp4"
},
"Picard - Engage!": {
"file": "data/clips/picardengage.mp4",
"description": "Picard Engage",
Expand Down
17 changes: 16 additions & 1 deletion data/drops.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,14 @@
},
"Ben's Gonna Talk About Africa": {
"file": "data/drops/bensgonnatalkaboutafrica.mp4",
"description": "Ben is Ben's Going To Gonna Talk About Africa.",
"description": "Ben is Ben's Going To Gonna Talk About Africa song",
"url": "https://i.imgur.com/UyqYbwe.mp4"
},
"Buddy Husnock": {
"file": "data/drops/buddyhusnock.mp4",
"description": "Buddy Husnock Weezer Buddy Holly parody song",
"url": "https://i.imgur.com/jHNoqFg.mp4"
},
"Bible Study": {
"file": "data/drops/biblestudy.mp4",
"description": "Bible Study. The way god wants it.",
Expand Down Expand Up @@ -174,6 +179,11 @@
"description": "Madlibs",
"url": "https://i.imgur.com/a3AAZ0r.mp4"
},
"Man In The Mirror (Time Beam Version)": {
"file": "data/drops/maninthemirror.mp4",
"description": "Man In The Mirror time beam parody song",
"url": "https://i.imgur.com/dZV54k7.mp4"
},
"Mayqueese": {
"file": "data/drops/mayqueese.mp4",
"description": "Mayqueese, Maquis",
Expand Down Expand Up @@ -244,6 +254,11 @@
"description": "Raincheck Segment",
"url": "https://i.imgur.com/UAXeJQ8.mp4"
},
"Return of Dukat": {
"file": "data/drops/returnofdukat.mp4",
"description": "Return of Dukat song",
"url": "https://i.imgur.com/SmMridO.mp4"
},
"Schismd": {
"file": "data/drops/schismd.mp4",
"description": "Schismd Schismed",
Expand Down

0 comments on commit e15841a

Please sign in to comment.