Updated to Discord.Net 1.0.1

This commit is contained in:
Noikoio 2017-07-21 19:50:28 -07:00
parent 3e668a3660
commit 80b83aeaab
2 changed files with 5 additions and 5 deletions

View file

@ -13,8 +13,8 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Discord.Net" Version="1.0.0-rc2" />
<PackageReference Include="Newtonsoft.Json" Version="10.0.2" />
<PackageReference Include="Discord.Net" Version="1.0.1" />
<PackageReference Include="Newtonsoft.Json" Version="10.0.3" />
<PackageReference Include="System.ValueTuple" Version="4.3.1" />
</ItemGroup>

View file

@ -308,7 +308,7 @@ namespace Noikoio.RegexBot
if (targetName == "_")
{
if (et == EntityType.Channel) return m.Channel;
else return await m.Author.CreateDMChannelAsync();
else return await m.Author.GetOrCreateDMChannelAsync();
}
EntityName ei = new EntityName(targetName, et);
@ -340,7 +340,7 @@ namespace Noikoio.RegexBot
if (ei.Id.HasValue)
{
// The easy way
return await _client.GetUser(ei.Id.Value).CreateDMChannelAsync();
return await _client.GetUser(ei.Id.Value).GetOrCreateDMChannelAsync();
}
// The hard way
@ -350,7 +350,7 @@ namespace Noikoio.RegexBot
string.Equals(ei.Name, u.Nickname, StringComparison.OrdinalIgnoreCase))
{
ei.UpdateId(u.Id); // As mentioned above, serves only to trigger the suggestion log
return await u.CreateDMChannelAsync();
return await u.GetOrCreateDMChannelAsync();
}
}
}