Skip to content

Commit d448f51

Browse files
committed
initial targeting at Discord.Net 3.1
1 parent 982dc81 commit d448f51

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

DiscordBot.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,8 @@ public void InitAndRun(string[] args)
163163
DiscordSocketConfig config = new()
164164
{
165165
MessageCacheSize = 50,
166-
AlwaysDownloadUsers = true
166+
AlwaysDownloadUsers = true,
167+
GatewayIntents = ClientConfig.GatewayIntents
167168
};
168169
//config.LogLevel = LogSeverity.Debug;
169170
Client = new DiscordSocketClient(config);

DiscordBotConfig.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,8 @@ public class DiscordBotConfig
4242

4343
/// <summary>Whether to allow direct messages (if not, only guild messages are allowed).</summary>
4444
public bool AllowDMs = false;
45+
46+
/// <summary>What gateway intents to connect with. Defaults to 'AllUnprivileged | GuildMessages'.</summary>
47+
public GatewayIntents GatewayIntents = GatewayIntents.AllUnprivileged | GatewayIntents.GuildMessages;
4548
}
4649
}

mcmonkeyDiscordBotBase.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
<EmbeddedResource Include="**\*.resx" />
1515
</ItemGroup>
1616
<ItemGroup>
17-
<PackageReference Include="Discord.Net" Version="2.4.0" />
18-
<PackageReference Include="Discord.Net.WebSocket" Version="2.4.0" />
17+
<PackageReference Include="Discord.Net" Version="3.1.0" />
18+
<PackageReference Include="Discord.Net.WebSocket" Version="3.1.0" />
1919
</ItemGroup>
2020
<ItemGroup>
2121
<Compile Remove="FreneticUtilities\*.*" />

0 commit comments

Comments
 (0)