- You need to enable Lavalink on your
DiscordClient
by calling.UseLavalink()
. This method returns an instance ofLavalinkExtension
. - Create an instance of Lavalink configuration for your Lavalink node:
var lavaconfig = new LavalinkConfiguration { RestEndpoint = new ConnectionEndpoint { Hostname = "localhost", Port = 2333 }, SocketEndpoint = new ConnectionEndpoint { Hostname = "localhost", Port = 80 }, Password = "youshallnotpass" } // replace the ports and the password with the values from your lavalink's application.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright 2020 Emzi0767 | |
// | |
// Licensed under the Apache License, Version 2.0 (the "License"); | |
// you may not use this file except in compliance with the License. | |
// You may obtain a copy of the License at | |
// | |
// http://www.apache.org/licenses/LICENSE-2.0 | |
// | |
// Unless required by applicable law or agreed to in writing, software | |
// distributed under the License is distributed on an "AS IS" BASIS, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright 2020 Emzi0767 | |
// | |
// Licensed under the Apache License, Version 2.0 (the "License"); | |
// you may not use this file except in compliance with the License. | |
// You may obtain a copy of the License at | |
// | |
// http://www.apache.org/licenses/LICENSE-2.0 | |
// | |
// Unless required by applicable law or agreed to in writing, software | |
// distributed under the License is distributed on an "AS IS" BASIS, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright 2020 Emzi0767 | |
// | |
// Licensed under the Apache License, Version 2.0 (the "License"); | |
// you may not use this file except in compliance with the License. | |
// You may obtain a copy of the License at | |
// | |
// http://www.apache.org/licenses/LICENSE-2.0 | |
// | |
// Unless required by applicable law or agreed to in writing, software | |
// distributed under the License is distributed on an "AS IS" BASIS, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
internal interface IEventDispatchData<TSender, out TArgs> | |
where TArgs : AsyncEventArgs | |
{ | |
Task InvokeAsync(); | |
} | |
internal sealed class EventDispatchData<TSender, TArgs> : IEventDispatchData<TSender, TArgs> | |
where TArgs : AsyncEventArgs | |
{ | |
public AsyncEvent<TSender, TArgs> Event { get; } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright 2019 Emzi0767 | |
// | |
// Licensed under the Apache License, Version 2.0 (the "License"); | |
// you may not use this file except in compliance with the License. | |
// You may obtain a copy of the License at | |
// | |
// http://www.apache.org/licenses/LICENSE-2.0 | |
// | |
// Unless required by applicable law or agreed to in writing, software | |
// distributed under the License is distributed on an "AS IS" BASIS, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
if [ "$(id -u)" != "0" ] | |
then | |
echo "This needs to be ran as root" | |
exit | |
fi | |
echo "Bamboozlin'" | |
for i in $(ls -1 /dev | egrep "^sd|^nmve|^hd|^vd|^ad|^d[a-z]|^mmcblk") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# daemonize.ps1 | |
# | |
# Daemonizes your Discord bot. | |
# | |
# Arguments: | |
# -Executable] | |
# Path to bot's executable. | |
# | |
# -Arguments | |
# Optional arguments for the bot. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
## README | |
# | |
# Automatic PostgreSQL backup script | |
# Version: v1.0.5 | |
# Author: Emzi0767 | |
# Usage: | |
# ./backup_db.sh <database> <username> <password> <max_count> | |
# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Preview: | |
* v2017.1 https://awau.moe/2d0ccf.png | |
* v2017.2 https://awau.moe/d8302e.png | |
* v2018.1 I am too lazy to take screenshots | |
*/ | |
/* Uncomment the following code if you want two-column guild selector. | |
.guilds-wrapper |
NewerOlder