Parameterize the redis url
This commit is contained in:
parent
08bd8a6fd1
commit
178ca616d1
|
@ -49,7 +49,6 @@
|
|||
config = {
|
||||
Cmd = [ "${my-crate}/bin/duplikate" ];
|
||||
};
|
||||
architecture = system;
|
||||
};
|
||||
in
|
||||
{
|
||||
|
@ -74,7 +73,7 @@
|
|||
docker push $amd64
|
||||
docker push $arm64
|
||||
docker manifest create --amend git.gmem.ca/arch/duplikate:latest $arm64 $amd64
|
||||
docker manifest push git.gmem.ca/arch/duplikate:latest
|
||||
docker manifest push git.gmem.ca/arch/duplikate:latest --purge
|
||||
'');
|
||||
};
|
||||
|
||||
|
|
|
@ -155,14 +155,14 @@ impl EventHandler for Handler {
|
|||
#[tokio::main]
|
||||
async fn main() {
|
||||
dotenv().ok();
|
||||
// Login with a bot token from the environment
|
||||
let redis_url = env::var("REDIS_URL").expect("Expected a Redis instance URL");
|
||||
let token = env::var("DISCORD_TOKEN").expect("Expected a token in the environment");
|
||||
// Set gateway intents, which decides what events the bot will be notified about
|
||||
let intents = GatewayIntents::GUILD_MESSAGES
|
||||
| GatewayIntents::DIRECT_MESSAGES
|
||||
| GatewayIntents::MESSAGE_CONTENT;
|
||||
|
||||
let client = redis::Client::open("redis://127.0.0.1/").unwrap();
|
||||
let client = redis::Client::open(redis_url).unwrap();
|
||||
let handler = Handler { redis: client };
|
||||
|
||||
// Create a new instance of the Client, logging in as a bot.
|
||||
|
|
Loading…
Reference in a new issue