Open ethanspitz opened 4 years ago
okay that's a neat idea, I actually was wanting to do something like this with some friends online, though I was going to run the program and then copy and paste the responses the AI gave to them so they could decide what to do
I also really want this in my discord channel!
Hi! I just found this project, and this issue stood out to me since I do some work with discord.py. I'd be interested to help bring this project to a Discord bot.
My idea is: the main set up commands would be on their own (will describe in a minute), then when the game is set up, an user can call [p]start
to get the bot to listen to every message in that channel (without needing to use a prefix) from allowed users. At any time, save / exit commands can be used by specifying the bot prefix.
Some commands I'm thinking of: (i'm not 100% familiar with all the possible input so this list can and will be expanded)
[p]create
- launches an interactive setup menu, with buttons for each possible choice. Returns game ID. (Only accessible if a game is not currently running in the channel)[p]create<arguments>
- same as above, but non-interactive. Also returns game ID. (Only accessible if a game is not currently running in the channel)[p]add/remove @User
- Add/remove) user to/from a game (so they can play as well) - this is also accessible while the game is running.[p]start <game ID> [save ID]
- if a game is not already ongoing in this channel, start a persistent interactive game session in this channel, and "lock" this channel so no other games can be started. If save ID is added, start this game from a certain save point.[p]end [game ID]
- End the game. This stops the game if it is running, and does not allow it to be started again. Optionally, can delete the messages and/or archive the messages to a text file which can be sent to the channel.In-game commands:
[p]save
- saves the game. Returns a save ID (this is linked to each game)[p]pause
- Pause running game. Unlocks the channel for use by other commands or other games. Returns a save ID.Some moderation commands are also possible - for example, "locking" a channel so users who are not part of the game can only read but not send messages to it.
A couple more thoughts:
I'd suggest using discord.py's wait_for
to wait for user input, then send a message like "Processing... ⌛️" which will be then deleted after the response is ready. (or just using the "User
Please let me know what y'all think, and what should be added / changed / not added / how practical this really is to run with multiple instances, since from what I understand this is heavily taxing on hardware resources
--berries
It would also be cool to make the bot work on Matrix.
I made a bot that allows you to play AI Dungeon with your friends. You can create a session and then add friends to it to play.
Usage:
p!play
- Start a new session
p!add @user
- Add a friend to play with
p!start
- Chose story mode
Invite: https://discordapp.com/oauth2/authorize?scope=bot&client_id=677143240356397067&permissions=387136
Invite: https://discordapp.com/oauth2/authorize?scope=bot&client_id=677143240356397067&permissions=387136
@ethanspitz @RyushoYosei @thrik @berries-boop
@kittenswolf Do you have the source for your bot on Github somewhere? I've got a bug report and some feature requests.
@TheFiZi While the code isn't public yet (I want to clean it up before releasing), you can submit issues/feature requests here: https://github.com/kittenswolf/aid-issues
Is this still up?
It's down and the creator won't release the sauce :/
Sorry for the delay. The source is now up:
Thanks, @kittenswolf. No worries. I'm pressed for time too, but I'll let you know if I tinker and get it working. I've got a decent small Discord community of gamers, so I'm definitely interested in it.
The bot is offline
🚀 Feature Request
What problem is this feature looking to solve? As a group, you can play AIDungeon together in a Discord Channel
Describe the solution you'd like Ability to run AIDungeon as a Discord Bot
Describe alternatives you've considered I've already written a pexpect wrapper, though my code is terrible as I'm more of a C programmer than a Python programmer. See a diff here of my proposed Discord Bot. (I didn't want to make a pull request because I honestly don't think it's worthy of being merged in yet).
https://github.com/AIDungeon/AIDungeon/compare/develop...ethanspitz:develop
Additional context Right now the bot I wrote simply uses pexpect to wait for user input to be needed. When new messages come out after user input, it pipes it to the discord channel #ai-adventure (I should probably make that configurable). Right now, it takes anything after "!ai " and feeds that into AI Dungeon 2.
As I've personally had stability issues, I have it so it auto saves after every command, can detect crashes, auto recover, and print the save code to the room in order to allow anyone to reload the game where it crashed.
Ultimately, I'm curious if there are others interested in using this. I'm open to suggestions on how to best manage this.