From d24f6ce1577bc28ae77a380f7f99e08ae76ef82c Mon Sep 17 00:00:00 2001 From: Charlie Date: Sun, 5 Jan 2025 13:48:40 -0500 Subject: [PATCH 1/4] Add files via upload --- whoami.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 whoami.py diff --git a/whoami.py b/whoami.py new file mode 100644 index 0000000..e36555f --- /dev/null +++ b/whoami.py @@ -0,0 +1,18 @@ +import discord +from discord.ext import commands + +class whoami(commands.Cog): + def __init__(self, bot): + self.bot = bot + + @commands.command() + async def whoami(self, ctx): + user_id = ctx.author.id + username = ctx.author.name + await ctx.send( + f"Your User ID is: {user_id}\n" + f"Your username is: {username}\n" + f"Your nickname in this server is: <@{user_id}>" + ) +async def setup(bot): + await bot.add_cog(whoami(bot)) From 0e970301b8422853aae49f6f295b0e03bf82b7cb Mon Sep 17 00:00:00 2001 From: Charlie Date: Sun, 5 Jan 2025 13:49:09 -0500 Subject: [PATCH 2/4] Update README.md --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 09d9cce..6438a79 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ # goobercustomcommands [Hello World!](https://github.com/WhatDidYouExpect/goobercustomcommands/blob/main/hello.py) by expect - +[Hello World!](https://github.com/WhatDidYouExpect/goobercustomcommands/blob/main/whoami.py) +by PowerPCFan From da5127f4d824394ae2bba985cf3b59e5b8286653 Mon Sep 17 00:00:00 2001 From: Charlie Date: Sun, 5 Jan 2025 13:49:17 -0500 Subject: [PATCH 3/4] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 6438a79..537d001 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # goobercustomcommands [Hello World!](https://github.com/WhatDidYouExpect/goobercustomcommands/blob/main/hello.py) by expect + + [Hello World!](https://github.com/WhatDidYouExpect/goobercustomcommands/blob/main/whoami.py) by PowerPCFan From cf415e78c77246909ada5580c319fdb0f035e45e Mon Sep 17 00:00:00 2001 From: Charlie Date: Sun, 5 Jan 2025 13:53:59 -0500 Subject: [PATCH 4/4] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 537d001..403564e 100644 --- a/README.md +++ b/README.md @@ -3,5 +3,5 @@ by expect -[Hello World!](https://github.com/WhatDidYouExpect/goobercustomcommands/blob/main/whoami.py) +[WhoAmI (lists username and nickname)](https://github.com/WhatDidYouExpect/goobercustomcommands/blob/main/whoami.py) by PowerPCFan