| 1 | package Discord::Client::Model::User; | ||
| 2 | |||
| 3 | 4 | ▶ | use v5.26; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 4 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | 4 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | 4 | ▶ | use parent 'Discord::Client::Model'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | |||
| 8 | 4 | our $VERSION = '0.004'; | |
| 9 | 1 | ▶ | sub username { $_[0]->get('username') } |
|
Subroutine
username: called CC=1 SCAR=0.0
Pod
documented
| |||
| 10 | 2 | ▶ | sub mention { '<@' . $_[0]->id . '>' } |
|
Subroutine
mention: called CC=1 SCAR=0.0
Pod
documented
| |||
| 11 | |||
| 12 | 1 | ▶ | sub create_dm { |
|
Subroutine
create_dm: called CC=1 SCAR=0.0
Pod
documented
| |||
| 13 | 1 | my ($self) = @_; | |
| 14 | |||
| 15 | # Open the DM explicitly and share REST with the returned channel snapshot. | ||
| 16 | 1 | my $request = $self->_call( create_dm => $self->id ); | |
| 17 | 1 | return $self->_model_future( channel => $request ); | |
| 18 | } | ||
| 19 | |||
| 20 | 0 | ▶ | sub refresh { |
|
Subroutine
refresh: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 21 | 0 | my ($self) = @_; | |
| 22 | |||
| 23 | # Fetch a replacement user snapshot without mutating this one. | ||
| 24 | 0 | my $request = $self->_call( get_user => $self->id ); | |
| 25 | 0 | return $self->_model_future( user => $request ); | |
| 26 | } | ||
| 27 | |||
| 28 | 4 | 1; | |
| 29 | |||
| 30 | __END__ | ||