BilliAlpha / discord-transfer

A discord bot for copying messages between guilds
26 stars 0 forks source link

How do you add the DISCORD_TOKEN? #2

Closed HadNutz closed 3 years ago

HadNutz commented 3 years ago

Hi there. I've got everything set, but cannot figure out how to feed the bot token as an environmental variable for the app. Is this done via the command line? Every time I've tried it returns: Missing arguments (action, guildA, guildB)

"Copy the bot token and pass it to the application via the DISCORD_TOKEN environment variable" I have the token, how do I get it into the app?

Do I create a file? Or run a command like: java -jar discord-transfer.jar DISCORD_TOKEN ansdfnasdnANSFNASDfASDNF

Thank you

BilliAlpha commented 3 years ago

Hello, It depends on how you run everything, if you have a linux-like (sh, bash, zsh ...) terminal it is as easy as prefixing the command. DISCORD_TOKEN="MY_BOT_TOKEN_HERE" java -jar discord-transfer.jar migrate 123456789 987654321

On powershell you have to set the environment variable before running the JAR.

$env:DISCORD_TOKEN="MY_BOT_TOKEN_HERE"
java -jar discord-transfer.jar migrate 123456789 987654321

The error message Missing arguments (action, guildA, guildB) means that you do not have enough arguments. Meaning that the program expects 3 arguments (the action to perform, the ID of the source guild, the ID of the destination guild). Make sure you passing in the 3 arguments, example : action = migrate, guildA = 123456789 and guildB = 987654321

Good luck

BilliAlpha commented 3 years ago

@HadNutz Did you manage to get the bot working ?

BilliAlpha commented 3 years ago

It's been almost 2 month and no activity. I'm closing the issue. If you're still having problems open a new issue please.