1#This is the same as Santinos answer, but not in plaintext ;-;
2
3#When getting a message, you're going to need an abc.Messageable object - essentially an object where you can send a message in, for example a text channel, a DM etc.
4
5#Example:
6@bot.command()
7async def getmsg(ctx, msgID: int): # yes, you can do msg: discord.Message
8 # but for the purposes of this, i'm using an int
9
10 msg = await ctx.fetch_message(msgID) # you now have the message object from the id
11 # ctx.fetch_message gets it from the channel
12 # the command was executed in
13
14
15###################################################
16
17@bot.command()
18async def getmsg(ctx, channel: discord.TextChannel, member: discord.Member):
19 msg = discord.utils.get(await channel.history(limit=100).flatten(), author=member)
20 # this gets the most recent message from a specified member in the past 100 messages
21 # in a certain text channel - just an idea of how to use its versatility