diff options
Diffstat (limited to 'src/plugins/relationshipNotifier/functions.ts')
-rw-r--r-- | src/plugins/relationshipNotifier/functions.ts | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/plugins/relationshipNotifier/functions.ts b/src/plugins/relationshipNotifier/functions.ts index c9ec6e3..104436a 100644 --- a/src/plugins/relationshipNotifier/functions.ts +++ b/src/plugins/relationshipNotifier/functions.ts @@ -16,6 +16,7 @@ * along with this program. If not, see <https://www.gnu.org/licenses/>. */ +import { getUniqueUsername, openUserProfile } from "@utils/discord"; import { UserUtils } from "@webpack/common"; import settings from "./settings"; @@ -43,11 +44,19 @@ export async function onRelationshipRemove({ relationship: { type, id } }: Relat switch (type) { case RelationshipType.FRIEND: if (settings.store.friends) - notify(`${user.tag} removed you as a friend.`, user.getAvatarURL(undefined, undefined, false)); + notify( + `${getUniqueUsername(user)} removed you as a friend.`, + user.getAvatarURL(undefined, undefined, false), + () => openUserProfile(user.id) + ); break; case RelationshipType.FRIEND_REQUEST: if (settings.store.friendRequestCancels) - notify(`A friend request from ${user.tag} has been removed.`, user.getAvatarURL(undefined, undefined, false)); + notify( + `A friend request from ${getUniqueUsername(user)} has been removed.`, + user.getAvatarURL(undefined, undefined, false), + () => openUserProfile(user.id) + ); break; } } |