Mentioning a user using a command [duplicate]
up vote
0
down vote
favorite
This question already has an answer here:
Getting a discord bot to mention other users
2 answers
Now I was doing a random command called !insult
to roast a person I tag with @
So my idea was going to write a message in discord chat such as!insult @Diz
and the bot would respond with @Diz you're bad
It's working fine with randomizing the "roasts" but I'm stuck on the @ part to tag that person I want.
If anyone could help me and knows a solution, I would appreciate it a lot.
python python-3.x discord discord.py
New contributor
marked as duplicate by Cris Luengo, Patrick Haugh
StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Nov 10 at 23:36
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
add a comment |
up vote
0
down vote
favorite
This question already has an answer here:
Getting a discord bot to mention other users
2 answers
Now I was doing a random command called !insult
to roast a person I tag with @
So my idea was going to write a message in discord chat such as!insult @Diz
and the bot would respond with @Diz you're bad
It's working fine with randomizing the "roasts" but I'm stuck on the @ part to tag that person I want.
If anyone could help me and knows a solution, I would appreciate it a lot.
python python-3.x discord discord.py
New contributor
marked as duplicate by Cris Luengo, Patrick Haugh
StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Nov 10 at 23:36
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
Welcome to Stack Overflow! See: The expectation on SO is that the user asking a question not only does research to answer their own question but also shares that research, code attempts, and results. This demonstrates that you’ve taken the time to try to help yourself, it saves us from reiterating obvious answers, and most of all it helps you get a more specific and relevant answer. Without doing this, you may start to get downvotes.
– Mozahler
Nov 10 at 17:12
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
This question already has an answer here:
Getting a discord bot to mention other users
2 answers
Now I was doing a random command called !insult
to roast a person I tag with @
So my idea was going to write a message in discord chat such as!insult @Diz
and the bot would respond with @Diz you're bad
It's working fine with randomizing the "roasts" but I'm stuck on the @ part to tag that person I want.
If anyone could help me and knows a solution, I would appreciate it a lot.
python python-3.x discord discord.py
New contributor
This question already has an answer here:
Getting a discord bot to mention other users
2 answers
Now I was doing a random command called !insult
to roast a person I tag with @
So my idea was going to write a message in discord chat such as!insult @Diz
and the bot would respond with @Diz you're bad
It's working fine with randomizing the "roasts" but I'm stuck on the @ part to tag that person I want.
If anyone could help me and knows a solution, I would appreciate it a lot.
This question already has an answer here:
Getting a discord bot to mention other users
2 answers
python python-3.x discord discord.py
python python-3.x discord discord.py
New contributor
New contributor
edited Nov 10 at 19:57
Tristo
9552519
9552519
New contributor
asked Nov 10 at 16:57
Volkoff
1
1
New contributor
New contributor
marked as duplicate by Cris Luengo, Patrick Haugh
StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Nov 10 at 23:36
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
marked as duplicate by Cris Luengo, Patrick Haugh
StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Nov 10 at 23:36
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
Welcome to Stack Overflow! See: The expectation on SO is that the user asking a question not only does research to answer their own question but also shares that research, code attempts, and results. This demonstrates that you’ve taken the time to try to help yourself, it saves us from reiterating obvious answers, and most of all it helps you get a more specific and relevant answer. Without doing this, you may start to get downvotes.
– Mozahler
Nov 10 at 17:12
add a comment |
Welcome to Stack Overflow! See: The expectation on SO is that the user asking a question not only does research to answer their own question but also shares that research, code attempts, and results. This demonstrates that you’ve taken the time to try to help yourself, it saves us from reiterating obvious answers, and most of all it helps you get a more specific and relevant answer. Without doing this, you may start to get downvotes.
– Mozahler
Nov 10 at 17:12
Welcome to Stack Overflow! See: The expectation on SO is that the user asking a question not only does research to answer their own question but also shares that research, code attempts, and results. This demonstrates that you’ve taken the time to try to help yourself, it saves us from reiterating obvious answers, and most of all it helps you get a more specific and relevant answer. Without doing this, you may start to get downvotes.
– Mozahler
Nov 10 at 17:12
Welcome to Stack Overflow! See: The expectation on SO is that the user asking a question not only does research to answer their own question but also shares that research, code attempts, and results. This demonstrates that you’ve taken the time to try to help yourself, it saves us from reiterating obvious answers, and most of all it helps you get a more specific and relevant answer. Without doing this, you may start to get downvotes.
– Mozahler
Nov 10 at 17:12
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
To tag a user you can use discord.User.mention
just like it says in the documentation
For example, you can have something like
@bot.command()
async def test(user:discord.User):
await bot.say(f"{user.mention} you're bad")
Thanks Tristo, that helped me, the exact command didn't work but I found a way,this is how it worked for me: @bot.command() async def insult(user:discord.User): await bot.say(random.choice(["%s blob." % user.mention]))
– Volkoff
Nov 11 at 9:09
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
To tag a user you can use discord.User.mention
just like it says in the documentation
For example, you can have something like
@bot.command()
async def test(user:discord.User):
await bot.say(f"{user.mention} you're bad")
Thanks Tristo, that helped me, the exact command didn't work but I found a way,this is how it worked for me: @bot.command() async def insult(user:discord.User): await bot.say(random.choice(["%s blob." % user.mention]))
– Volkoff
Nov 11 at 9:09
add a comment |
up vote
0
down vote
To tag a user you can use discord.User.mention
just like it says in the documentation
For example, you can have something like
@bot.command()
async def test(user:discord.User):
await bot.say(f"{user.mention} you're bad")
Thanks Tristo, that helped me, the exact command didn't work but I found a way,this is how it worked for me: @bot.command() async def insult(user:discord.User): await bot.say(random.choice(["%s blob." % user.mention]))
– Volkoff
Nov 11 at 9:09
add a comment |
up vote
0
down vote
up vote
0
down vote
To tag a user you can use discord.User.mention
just like it says in the documentation
For example, you can have something like
@bot.command()
async def test(user:discord.User):
await bot.say(f"{user.mention} you're bad")
To tag a user you can use discord.User.mention
just like it says in the documentation
For example, you can have something like
@bot.command()
async def test(user:discord.User):
await bot.say(f"{user.mention} you're bad")
answered Nov 10 at 17:27
Tristo
9552519
9552519
Thanks Tristo, that helped me, the exact command didn't work but I found a way,this is how it worked for me: @bot.command() async def insult(user:discord.User): await bot.say(random.choice(["%s blob." % user.mention]))
– Volkoff
Nov 11 at 9:09
add a comment |
Thanks Tristo, that helped me, the exact command didn't work but I found a way,this is how it worked for me: @bot.command() async def insult(user:discord.User): await bot.say(random.choice(["%s blob." % user.mention]))
– Volkoff
Nov 11 at 9:09
Thanks Tristo, that helped me, the exact command didn't work but I found a way,this is how it worked for me: @bot.command() async def insult(user:discord.User): await bot.say(random.choice(["%s blob." % user.mention]))
– Volkoff
Nov 11 at 9:09
Thanks Tristo, that helped me, the exact command didn't work but I found a way,this is how it worked for me: @bot.command() async def insult(user:discord.User): await bot.say(random.choice(["%s blob." % user.mention]))
– Volkoff
Nov 11 at 9:09
add a comment |
Welcome to Stack Overflow! See: The expectation on SO is that the user asking a question not only does research to answer their own question but also shares that research, code attempts, and results. This demonstrates that you’ve taken the time to try to help yourself, it saves us from reiterating obvious answers, and most of all it helps you get a more specific and relevant answer. Without doing this, you may start to get downvotes.
– Mozahler
Nov 10 at 17:12