]> ruin.nu Git - NDIRC.git/blobdiff - Delling.pm
Use discord channel id
[NDIRC.git] / Delling.pm
index 178e58b5f1459c1d912085b81659a7c93907ee12..1eb4824d98f1d263ff27f39b6c0ce46bd0239ee3 100644 (file)
@@ -229,9 +229,9 @@ after discord_message_create => sub {
        my $author_id = $author->{id};
        return if $author->{'id'} eq $self->discord_id; # Ignore my own messages
 
-       my $channel = "pm";
+       my $channel = "D-".$channel_id;
        if (exists $self->discord_channels->{$channel_id}) {
-               $channel = "#".$self->discord_channels->{$channel_id};
+               $channel = 'dm' if ($self->discord_channels->{$channel_id}->{type} == 1);
        }
 
        say localtime(time) . " - $channel_id $channel $author_name $author_id";