Updated to discord.net rc
This commit is contained in:
parent
520fbe917f
commit
9cd3a16a02
@ -1 +1 @@
|
|||||||
Subproject commit 40fa35c851076fb035fab06deb06f2b013281c15
|
Subproject commit fa2568bc312ba35f1518e47601c62fccdb949731
|
@ -4,12 +4,11 @@ TITLE Downloading NadekoBot, please wait
|
|||||||
SET root=%~dp0
|
SET root=%~dp0
|
||||||
CD /D %root%
|
CD /D %root%
|
||||||
SET rootdir=%cd%
|
SET rootdir=%cd%
|
||||||
SET build1=%root%NadekoInstall_Temp\NadekoBot\Discord.Net\src\Discord.Net.API\
|
SET build1=%root%NadekoInstall_Temp\NadekoBot\Discord.Net\src\Discord.Net.Core\
|
||||||
SET build2=%root%NadekoInstall_Temp\NadekoBot\Discord.Net\src\Discord.Net.Core\
|
SET build2=%root%NadekoInstall_Temp\NadekoBot\Discord.Net\src\Discord.Net.Rest\
|
||||||
SET build3=%root%NadekoInstall_Temp\NadekoBot\Discord.Net\src\Discord.Net.Rest\
|
SET build3=%root%NadekoInstall_Temp\NadekoBot\Discord.Net\src\Discord.Net.WebSocket\
|
||||||
SET build4=%root%NadekoInstall_Temp\NadekoBot\Discord.Net\src\Discord.Net.WebSocket\
|
SET build4=%root%NadekoInstall_Temp\NadekoBot\Discord.Net\src\Discord.Net.Commands\
|
||||||
SET build5=%root%NadekoInstall_Temp\NadekoBot\Discord.Net\src\Discord.Net.Commands\
|
SET build5=%root%NadekoInstall_Temp\NadekoBot\src\NadekoBot\
|
||||||
SET build6=%root%NadekoInstall_Temp\NadekoBot\src\NadekoBot\
|
|
||||||
SET installtemp=%root%NadekoInstall_Temp\
|
SET installtemp=%root%NadekoInstall_Temp\
|
||||||
::Deleting traces of last setup for the sake of clean folders, if by some miracle it still exists
|
::Deleting traces of last setup for the sake of clean folders, if by some miracle it still exists
|
||||||
IF EXIST %installtemp% ( RMDIR %installtemp% /S /Q >nul 2>&1)
|
IF EXIST %installtemp% ( RMDIR %installtemp% /S /Q >nul 2>&1)
|
||||||
@ -39,8 +38,6 @@ CD /D %build4%
|
|||||||
dotnet restore >nul 2>&1
|
dotnet restore >nul 2>&1
|
||||||
CD /D %build5%
|
CD /D %build5%
|
||||||
dotnet restore >nul 2>&1
|
dotnet restore >nul 2>&1
|
||||||
CD /D %build6%
|
|
||||||
dotnet restore >nul 2>&1
|
|
||||||
dotnet build --configuration Release >nul 2>&1
|
dotnet build --configuration Release >nul 2>&1
|
||||||
::Attempts to backup old files if they currently exist in the same folder as the batch file
|
::Attempts to backup old files if they currently exist in the same folder as the batch file
|
||||||
IF EXIST "%root%NadekoBot\" (GOTO :backupinstall)
|
IF EXIST "%root%NadekoBot\" (GOTO :backupinstall)
|
||||||
|
@ -98,7 +98,7 @@ namespace NadekoBot.Modules.Games.Trivia
|
|||||||
if (ShowHints)
|
if (ShowHints)
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
await questionMessage.ModifyAsync(m => m.Embed = questionEmbed.WithFooter(efb => efb.WithText(CurrentQuestion.GetHint())))
|
await questionMessage.ModifyAsync(m => m.Embed = questionEmbed.WithFooter(efb => efb.WithText(CurrentQuestion.GetHint())).Build())
|
||||||
.ConfigureAwait(false);
|
.ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
catch (HttpException ex) when (ex.StatusCode == System.Net.HttpStatusCode.NotFound || ex.StatusCode == System.Net.HttpStatusCode.Forbidden)
|
catch (HttpException ex) when (ex.StatusCode == System.Net.HttpStatusCode.NotFound || ex.StatusCode == System.Net.HttpStatusCode.Forbidden)
|
||||||
|
@ -460,17 +460,16 @@ $"{("tracks".SnPl(musicPlayer.Playlist.Count))} | {(int)total.TotalHours}h {tota
|
|||||||
[Priority(0)]
|
[Priority(0)]
|
||||||
public async Task Remove(int num)
|
public async Task Remove(int num)
|
||||||
{
|
{
|
||||||
|
|
||||||
MusicPlayer musicPlayer;
|
MusicPlayer musicPlayer;
|
||||||
if (!MusicPlayers.TryGetValue(Context.Guild.Id, out musicPlayer))
|
if (!MusicPlayers.TryGetValue(Context.Guild.Id, out musicPlayer))
|
||||||
return;
|
return;
|
||||||
if (((IGuildUser)Context.User).VoiceChannel != musicPlayer.PlaybackVoiceChannel)
|
if (((IGuildUser)Context.User).VoiceChannel != musicPlayer.PlaybackVoiceChannel)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
musicPlayer.SongRemoved += async (song) =>
|
musicPlayer.SongRemoved += async (song) =>
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
||||||
var embed = new EmbedBuilder()
|
var embed = new EmbedBuilder()
|
||||||
.WithAuthor(eab => eab.WithName("Removed song #" + num).WithMusicIcon())
|
.WithAuthor(eab => eab.WithName("Removed song #" + num).WithMusicIcon())
|
||||||
.WithDescription(song.PrettyName)
|
.WithDescription(song.PrettyName)
|
||||||
|
@ -60,7 +60,7 @@ namespace NadekoBot.Modules.Searches
|
|||||||
|
|
||||||
await Task.Delay(10000).ConfigureAwait(false);
|
await Task.Delay(10000).ConfigureAwait(false);
|
||||||
|
|
||||||
await sent.ModifyAsync(m => m.Embed = embed.AddField(efb => efb.WithName("Alt").WithValue(comic.Alt.ToString()).WithIsInline(false)));
|
await sent.ModifyAsync(m => m.Embed = embed.AddField(efb => efb.WithName("Alt").WithValue(comic.Alt.ToString()).WithIsInline(false)).Build());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -14,7 +14,7 @@ namespace NadekoBot.Services.Impl
|
|||||||
private ShardedDiscordClient client;
|
private ShardedDiscordClient client;
|
||||||
private DateTime started;
|
private DateTime started;
|
||||||
|
|
||||||
public const string BotVersion = "1.1.0-alpha";
|
public const string BotVersion = "1.1.0-beta";
|
||||||
|
|
||||||
public string Author => "Kwoth#2560";
|
public string Author => "Kwoth#2560";
|
||||||
public string Library => "Discord.Net";
|
public string Library => "Discord.Net";
|
||||||
|
@ -122,9 +122,9 @@ namespace NadekoBot
|
|||||||
_log.Info($"Shard #{c.ShardId} downloaded {c.Guilds.Sum(g => g.Users.Count)} users after {sw.Elapsed.TotalSeconds:F2}s ({++_downloadedCount}/{Clients.Count}).");
|
_log.Info($"Shard #{c.ShardId} downloaded {c.Guilds.Sum(g => g.Users.Count)} users after {sw.Elapsed.TotalSeconds:F2}s ({++_downloadedCount}/{Clients.Count}).");
|
||||||
}));
|
}));
|
||||||
|
|
||||||
public Task SetGame(string game) => Task.WhenAll(Clients.Select(ms => ms.SetGame(game)));
|
public Task SetGame(string game) => Task.WhenAll(Clients.Select(ms => ms.SetGameAsync(game)));
|
||||||
|
|
||||||
|
|
||||||
public Task SetStream(string name, string url) => Task.WhenAll(Clients.Select(ms => ms.SetGame(name, url, StreamType.NotStreaming)));
|
public Task SetStream(string name, string url) => Task.WhenAll(Clients.Select(ms => ms.SetGameAsync(name, url, StreamType.NotStreaming)));
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user