very important crashfix
This commit is contained in:
1 parent
09bdaee91e
commit
4770929e40
1 file changed
+8
-3
@@ -49,8 +49,10 @@ namespace NadekoBot.Commands {
|
||||
var controls = AnnouncementsDictionary[e.Server.Id];
|
||||
var channel = NadekoBot.client.GetChannel(controls.ByeChannel);
|
||||
if (channel == null) return;
|
||||
|
||||
await channel.Send(controls.ByeText.Replace("%user%", e.User.Mention));
|
||||
var msg = controls.GreetText.Replace("%user%", e.User.Mention).Trim();
|
||||
if (msg == null || msg == "")
|
||||
return;
|
||||
await channel.Send(msg);
|
||||
}
|
||||
|
||||
private async void UserJoined(object sender, Discord.UserEventArgs e) {
|
||||
@@ -61,7 +63,10 @@ namespace NadekoBot.Commands {
|
||||
var channel = NadekoBot.client.GetChannel(controls.GreetChannel);
|
||||
if (channel == null) return;
|
||||
|
||||
await channel.Send(controls.GreetText.Replace("%user%", e.User.Mention));
|
||||
var msg = controls.GreetText.Replace("%user%", e.User.Mention).Trim();
|
||||
if (msg == null || msg == "")
|
||||
return;
|
||||
await channel.Send(msg);
|
||||
}
|
||||
|
||||
public class AnnounceControls {
|
||||
|
||||
Reference in new issue
Block a user