Open blamos opened 2 years ago
I do see what you're going for with this.
I'm under the impression that roll
should stay as is (specifically a dice roll), and at most get a different name. Rebrand maybe to dice
and activate via "!dice [x: dice] [y: sides]" and "/dice [x: dice] [y: sides]".
Quick brainstorm:
Assuming the name is changed, a new method with multiple sub-methods activated via a secondary keyword could work. Example:
$ /add_film fnfp https://www.imdb.com/title/tt0435961/?ref_=nv_sr_srsg_0
# Link is added, but truncated to remove everything at and after '?', since UTM parameters are not required.
# Creates a new dict or entry in a dict called "fnfp_film":
# {
0000000000: [{
"url": "https://www.imdb.com/title/tt0435961/",
"name": "Gungrave",
"rating": "7.5",
"runtime": 01:23:45,
"synopsis": "Gungrave follows the story of best friends Brandon Heat ..."
"year": "2003"
},
{,
"url": "https://www.imdb.com/title/xx0000000/",
"name": "Film",
"rating": "6.66",
"runtime": "00:27:39",
"synopsis": "This is not a real film, but simply a placeholder."
"released": "2022-09-16T04:32:53+00:00",
}]
}
$ /roll fnfp
^^^ Would trigger the "Friday Night Film Posse" sub-method via reserved word that rolls based on the object generated by user-submitted IMDB and/or Rotten Tomatoes links that would scrape data about the film, document the user that added the film, store the synopsis, and additionally (maybe) query streaming services that host the film. Other reserved words or add functions could be created specifically for different types of media like films, anime, music, etc.
This would obviously create the necessity of getters, setters, and query functionality. As well, a user should be warned about duplicates and certain overrides should be implemented for some of the scenarios we've previously encountered, like:
pass
function: users in voice channel get an ephemeral dialogue to vote for or against the film selected at random with time limitation for response.x
amount of entries in the dict to select the two they'd like included in the roll.possibly many more
Additionally, the ability to add custom user-generated categories for selection via generic method would probably nice, but would lack the additional functionality of the methods related to film selection because of scope. Example:
$ /add rps rock
$ /add rps paper
$ /add rps scissors
$ /roll rps
> scissors
$ /roll rps
> rock
@blamos Your thoughts?
Yes to this!
Also thinking an additional disqualifier would also be good here; if an entry has been skipped b/c of absenteeism (no call/no show) that their item be removed.
Example: user added item is not included in roll for 4 times in a row, drop the entry from the stored collection.
Context: Dice roll function is used to select from a user submitted list of items.
Summary: Dice roll feature should be aware of association between user and user submitted list objects. The bot should specify which user had their object randomly chosen in the outcome result.
Detail: Bot function which takes in a collection of objects, rolls an sided die relative to object count, matches the roll result to an object, respond back with: roll result, object.name, object.user.
The structure for the object might look something like ...
{name: "Movie title", properties: {length: "1hr 30min", rating: "10", year: "2022"} }
To accommodate different types of objects, the function could probably attempt to map the data structure's key/value pairs.
There is an additional assumption here, in that the bot would receive objects from multiple users in a single channel.
Context:
Real world example: