#DiscordUser/DiscordMember.SendMessageAsync troubles

1 messages · Page 1 of 1 (latest)

sour tangle
#

I'm tying to send myself a message(dm) when someone uses a command.
How amd I supposed to do this?
I see DiscordUser.cs has SendMessageAsync. Has that code not shipped yet?

I see checkin comments about moving it from DiscordMember...

Is what I'm trying to do currently possible... or is it setup purely to respond or send messages to channels?

Thanks.

sour tangle
#

Basically, I'm getting a message that says DiscordUser doesn't contain the method SendMessageAsync. :/

queen ruin
#

You can, its in the nightly branch

#

You have to share a server with the user, thats why it was on the member formerly. but we dont need any information from the member, thats why we moved it. Also with user installs you can dm users which have the app installed but you dont share a server with the guild install

queen ruin
sour tangle
#

Thanks! So it's not in 4.4.9 or what ever nuget package is out now. Any idea when it'll ship that way?

Thanks again.

nova knoll
#

there's no ETAs on the next stable release, but i wouldn't expect it to happen within this year

#

it'll be ready when it's ready; and we strongly recommend people use the nightly versions, which are faster, more reliable and have more features implemented

queen ruin
sour tangle
#

Thanks again for being so helpful.

sour tangle
#

Ah, this changes a number of things from 4.x.

nova knoll
#

##1585

fickle flameBOT
nova knoll
sour tangle
#
 _client.ClientErrored += Client_Error;
 _client.SocketClosed += Client_SocketClosed;
 _client.SocketErrored += Client_SocketErrored;

ClientErrored and SocketErrored are just gone? I'm using these to managed my app state for health checks to bounce the container if it never recovers.

fickle flameBOT
#

DSharpPlus.Net.Gateway.IGatewayController

Summary

Provides a low-level interface for controlling individual gateway clients and their connections.

Declaration

public abstract interface IGatewayController;
nova knoll
#

as well as IClientErrorHandler

sour tangle
#

Thanks.

sour tangle
#

One last silly question. Looks like the Aliases attribute is gone? We can't do Alias commands anymore then?

fickle flameBOT
#

DSharpPlus.Commands.Trees.Metadata.TextAliasAttribute

Summary

No summary provided.

Declaration

[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method | AttributeTargets.Delegate)]
public sealed class TextAliasAttribute : Attribute
{
	public string[] Aliases { get; init; }
}
nova knoll
#

pro tip: don't assume something is gone, try to look for it instead 😛

sour tangle
#

I did give it a go. Searched this section and docs for Alias. 😂 I guess I have to try harder next time.

#

Thank you again.

#

Oh, I only searched the conversion/new stuff articles, my bad.

nova knoll
#

we don't have a guide from cnext to commands yet since it's not technically deprecated, but it will be once i'm done with it