Nabrok / gw2-discord-bot

Discord bot for the Guild Wars 2 API.
GNU General Public License v3.0
33 stars 25 forks source link

[Help] What is the best OS ? #25

Closed Zalatis closed 7 years ago

Zalatis commented 7 years ago

I put a GW2 api with a pm to the bot like this one

link APIKEY

But I think the Key didn't saved to the bot database

And I don't know how to do this and don't understand if the unix socket is required or not and how to do this


`[redis] host = "127.0.0.1" port = "6379" path = "" # path to unix socket, use this over host/port if you can. password = "" db = "0" # database number

[world] id = 2104 # world member has to be on to get in role, and default world for wvw stuffs. role = "" # Name of the role, leave blank if you don't want this

[guild] id = "C56F040F-1CF1-E611-80D3-AC162DC0847D" # Guild unique ID in format XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXX, this can be found at https://api.guildwars2.com/v2/guild/search?name=[guild name] key = "" # API Key from top guild rank with the "guilds" permission member_role = "Membre certifié" # Name of the role guild members go in create_roles = true # Have the bot create roles for each rank. If false, members will only be assigned to their rank role if it exists. motd_channel = "" # Will set the channel description to the guild motd motd_convert_urls = true # Convert urls in the guild motd to actual urls that discord parses to a link, if they don't start with e.g. "http://" motd_excluded_subdomains = [ # An array of url subdomains of which the url should not be converted (these are regular expressions) "[^\.]ts[^\.]", # ts.example.com "[^\.]teamspeak[^\.]" # teamspeak.example.com ]

[discord] clientid = "336860774418874400" # Used to generate a link to add the bot to a server client_secret = "" # Only required if "web" feature is enabled token = "MzM2ODYwNzc0NDE4ODc0NDAw.DE-dkA.EFU53tpeRzDLUHvjfq-3RbM7HuI" # Token for your discord bot user

[web] domain = "127.0.0.1" protocol = "http" port = "3000"

public_url = "https://mydomain.com/" # Use this for the public url if behind a proxy (such as nginx)

[features] language = "fr" enabled = ["ranks", "motd", "wvw_score", "progression", "builds", "wiki", "session", "whois", "li"] `

AdaFrame commented 7 years ago

I tried doing this myself and it didn't work. What you have to do is just DM the word link to the bot. It will reply asking you to generate a key with a specific name. then you just reply with the API key. Also, might want to clear some of the stuff in your config here.

Nabrok commented 7 years ago

You initiate the by direct messaging "link" by itself. The bot will respond with a short alphanumeric code that you need to include in the API key name (this is to make sure the key is actually yours).

Make the key with that included in the name and then send it to the bot.

Note that the code does not need to be the entire name, it just has to be included in it.