barkeep's Issues
Add workflow to run tests
Goal
Run all tests every time a branch is pushed so we don't accidentally break them without noticing
Solution
Add a github workflow that runs tests on push.
Add Avalon to bot
#Goal
- Distribute Avalon roles to users
- Give users required information
- Seating Order
- Handle quests
- Users vote approve/veto
- Questers vote pass/fail
- Output both outcomes once all required votes have received
#Solution
Roles we want
- Good
- Evil
- Morgana
- Percival
- Merlin
- Mordred
- Assassin
- Cleric
- Troublemaker
- Trickster
- Oberon
- Good Lancelot
- Evil Lancelot
Role
- Team
- Info on startup
- Get given list of people and what roles they are
- Start Player
- Name
- Team it appears as if revealed (defaults to Team)
- Team it appears as to Merlin (defaults to Team)
- Hides from evil (default: no)
/Start Game
- Clear previous game info
- Distribute Roles
- Make a list of everyone playing
- Shuffle it
- Display the list
- Give everyone a role
- Tell everyone their role and hidden info
- store a list of players (as discord Member.ids?)
Quests
Persistent knowledge of current quest and its state handled by writing to a file (.JSON)
Proposal Phase
- Quest Proposal is given
- Ping players of game
- Store Quest Proposal
- Stored with Candidates, People who have voted
- Electorate can become voters
- When everyone has voted...
- Either:
- Ping everyone to say the quest has not been greenlit
- Ping everyone to say the quest is a-go
- Create and store a Quest
- A quest has candidates and people who have voted
- Thus the proposal needs to know who all is on the quest
Quest Phase
-
Candidates can become voters
-
Once candidates have voted:
- Either:
- Ping everyone to say how many success/failures have happened.
- Either:
-
quest-create: creates a quest unless there's an active quest
-
quest-display: displays active quest if any
-
quest-vote-approval: creates a dialogue to vote on the current quest (approve/veto)
-
quest-vote-succeed: creates a dialogue to vote on the current quest (success/fail)
-
quest-close: forces current quest to close (use for mistakes)
-
game-create: starts a new game
Upgrade to Discord v2
Goal
The existing code doesn't work with the discord.py v2.3.2 and needs upgrading.
Solution
- Add a
requirements.txt
specifying the discord.py version. - Follow this guide to set up the discord bot.
Extract server id
Goal
Enable separation of production and development environments by extracting the server id to an uncommitted file.
Solution
- Create
server_id.txt
in both environments with the server id in. - In
main.py
read in the server id from a file in the Clientsetup_hook
method. - Add
README.md
explaining this setup
Simplify drinks
Goal
Simplify Drink.py
.
Currently Drink.py
stores the name and article of a drink separately and uses some logic to generate the appropriate article for the drink based on the entry in drinks.txt
. The only usage of Drink then concatenates the article and name together, making this logic superfluous.
Solution
- Add the appropriate article to each entry in
drinks.txt
. This will be specified explicitly in the formatarticle|name
, or bea/an
if no article is specified. - Remove the
Drink
dataclass. - Remove the
hydrate
method and just use the value from the file directly. - Use the selected string for the drink directly in
main.py
instead of attempting to concatenate the article and name.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.