If you want to set up this card game on your server, follow this invite link For self hosting please use a guide below.
You would need NodeJS 7 or higher and MongoDB 3.4 or higher.
For a correct runtime you would need to run API server. After that make sure you create your own ./settings/general.json
which will look like this:
{
"clientid": "",
"token": "",
"admins": [""],
"database": "mongodb://localhost:27017/amusement",
"botperm": "125952",
"botcolor": "f426d5",
"logpath": "~/log/amusement-club/",
"botprefix": "->",
"lockChannel": "",
"cardurl": "https://amusementclub.nyc3.digitaloceanspaces.com",
"dbltoken": "",
"dblpass": "",
"s3accessKeyId": "",
"s3secretAccessKey": "",
"cardprice": [ 80, 150, 300, 600, 1000]
}
clientID
client ID for Discord bottoken
Discord tokenadmins
put Discord IDs of people who can run admin only commandsdatabase
your MongoDB Databasebotperm
a code for bot permissions when joining a server (optional)botcolor
color for embed messageslogpath
logging pathbotprefix
prefix you would like to use (up to 3 characters)lockChannel
channel to lock to a daily collection (optional)cardurl
base URL to a CDN or storage serverdbltoken
not used anymoredblpass
not used anymores3accessKeyID
Amazon S3 access key (used to search for new cards, optional if you don't use Ayano)s3secretAccessKey
Amason S3 secret keycardprice
array for card prices depending on rarity (used whne selling cards to bot)
Make sure you do npm install
Start bot by running node index.js
If you have your own S3 host with cards, you can use Ayano to add cards automatically. For a quick testing you can add restore a sample database dump from amusement_testdb.tar.gz
. Unzip the archive and use mongorestore
to restore 3 essential tables that you need.
Ayano is a bot integrated into Amusement Club to handle shards, restarts, errors and card adding.
Please make sure you create a file ./settings/ayano.json
which will look like this:
{
"token": "",
"startpoint": "./index.js",
"mainchannel": "",
"botcommchannel": "",
"reportchannel": "",
"adminID": "",
"s3accessKeyId": "",
"s3secretAccessKey": "",
"logchannel": "",
"cardprice": [ 80, 150, 300, 600, 1000]
}
token
Discord bot tokenstartpoint
path to file that is used to start Amusement Clubmainchannel
ID of the main channel on your server (used to gree new people)botcommchannel
ID of the channel that is used for Ayano commands (please note that everyone who has access to the channel can give Ayano commands)reportchannel
ID of the channel to report user suspicious behaviouradminID
Discord ID of admin users3accessKeyId
key ID for requesting card list from a remote storage servers3secretAccessKey
secret access key for requesting card list from a remote storage serverlogchannel
channel for logging important thingscardprice
basic card prices when selling to bot
Ayano supports remote storage servers of S3 type (e.g. Amazon S3, DigitalOcean Spaces). For a detailed listing you would have to specify s3accessKeyId
and s3secretAccessKey
. You can obtain them in the dashboard of service you are using.
On the server make sure you have /cards/
and (optional) /promo/
. Both folders will have subfolders that are named like collections. Those subfolders will contain .png
, .gif
or .jpg
files for cards. The name of the card should be rarity_name_with_underscare.extention
. So in the end you will have, for example /cards/yuruyuri/2_lady_toshinou.png
After setting up everything you can run ayy update
in the bot commands channel you specified in the config. Ayano will populate cards
table in your database as well as collections
table. After that please head to your collections
table in the database and and fill up details manually. Note that if you are using .jpg
cards for collection, you have to make sure that compressed
is set to true
.
ayy start
starts up all shards for botayy stop
stops all shardsayy restart
restarts all shardsayy update
updates all collections fromcards/
directory on S3 storage serverayy update promo
updates all collections frompromo/
directory on S3 storage serverayy rename [card query], [new name]
renames a cardayy collection [collection query] [new name]
renames a collectionayy origin [collection query] [new origin]
sets a new collection originayy alias <add|remove> [collection query] [alias]
adds or removes collection aliasayy help
lists all the commands