AIOHTTP meme command discord.py The 2019 Stack Overflow Developer Survey Results Are In Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) The Ask Question Wizard is Live! Data science time! April 2019 and salary with experienceUpload an embed image?Calling an external command in PythonPy2exe tuple index out pf range issue when creating exe filewhen install OSMnx get erroe “UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd5 in position 24: invalid continuation byte”Tensorflow - 'Unable to get element as bytes' error'NoneType' object has no attribute 'mention' when trying to read from MySQL with Discord.pyImporting tensorflow not working when upgradedDiscord.py Bot Not Leaving Voice ChannelFailed to establish a new connection Discord.pyError give role when a user add reaction Discord.pydiscord bot autorole — in _run_event yield from getattr(self, event)(*args, **kwargs)
How did passengers keep warm on sail ships?
What is the padding with red substance inside of steak packaging?
Single author papers against my advisor's will?
Do warforged have souls?
Would an alien lifeform be able to achieve space travel if lacking in vision?
Do ℕ, mathbbN, BbbN, symbbN effectively differ, and is there a "canonical" specification of the naturals?
1960s short story making fun of James Bond-style spy fiction
Are there continuous functions who are the same in an interval but differ in at least one other point?
Why did Peik Lin say, "I'm not an animal"?
Student Loan from years ago pops up and is taking my salary
Example of compact Riemannian manifold with only one geodesic.
Is every episode of "Where are my Pants?" identical?
What can I do if neighbor is blocking my solar panels intentionally?
US Healthcare consultation for visitors
Mortgage adviser recommends a longer term than necessary combined with overpayments
Did the UK government pay "millions and millions of dollars" to try to snag Julian Assange?
Deal with toxic manager when you can't quit
Can the Right Ascension and Argument of Perigee of a spacecraft's orbit keep varying by themselves with time?
60's-70's movie: home appliances revolting against the owners
Why not take a picture of a closer black hole?
Can a flute soloist sit?
Am I ethically obligated to go into work on an off day if the reason is sudden?
Do I have Disadvantage attacking with an off-hand weapon?
What do I do when my TA workload is more than expected?
AIOHTTP meme command discord.py
The 2019 Stack Overflow Developer Survey Results Are In
Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)
The Ask Question Wizard is Live!
Data science time! April 2019 and salary with experienceUpload an embed image?Calling an external command in PythonPy2exe tuple index out pf range issue when creating exe filewhen install OSMnx get erroe “UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd5 in position 24: invalid continuation byte”Tensorflow - 'Unable to get element as bytes' error'NoneType' object has no attribute 'mention' when trying to read from MySQL with Discord.pyImporting tensorflow not working when upgradedDiscord.py Bot Not Leaving Voice ChannelFailed to establish a new connection Discord.pyError give role when a user add reaction Discord.pydiscord bot autorole — in _run_event yield from getattr(self, event)(*args, **kwargs)
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
I'm making a discord bot and I'm trying to make a random meme command and here's my error and code:
@client.command(pass_context=True)
async def meme(ctx):
embed = discord.Embed(title="meme", description="test")
async with aiohttp.ClientSession() as cs:
async with cs.get('https://www.reddit.com/r/dankmemes/new.json?sort=hot') as r:
res = await r.json()
embed.set_image(res['data']['children'] [random.randint(0, 25)]['data']['url'])
await client.say(embed=embed)
Ignoring exception in command meme
Traceback (most recent call last):
File "C:UsersatillAppDataLocalProgramsPythonPython36libsite-packagesdiscordextcommandscore.py", line 50, in wrapped
ret = yield from coro(*args, **kwargs)
File "C:UsersatillDownloadsEpic Botserver.py", line 165, in meme
embed.set_image(res['data']['children'] [random.randint(0, 25)]['data']['url'])
TypeError: set_image() takes 1 positional argument but 2 were given
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:UsersatillAppDataLocalProgramsPythonPython36libsite-packagesdiscordextcommandsbot.py", line 846, in process_commands
yield from command.invoke(ctx)
File "C:UsersatillAppDataLocalProgramsPythonPython36libsite-packagesdiscordextcommandscore.py", line 374, in invoke
yield from injected(*ctx.args, **ctx.kwargs)
File "C:UsersatillAppDataLocalProgramsPythonPython36libsite-packagesdiscordextcommandscore.py", line 54, in wrapped
raise CommandInvokeError(e) from e
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: TypeError: set_image() takes 1 positional argument but 2 were given
I'm not sure how to make it so it is in an embed aswell
python discord discord.py aiohttp
add a comment |
I'm making a discord bot and I'm trying to make a random meme command and here's my error and code:
@client.command(pass_context=True)
async def meme(ctx):
embed = discord.Embed(title="meme", description="test")
async with aiohttp.ClientSession() as cs:
async with cs.get('https://www.reddit.com/r/dankmemes/new.json?sort=hot') as r:
res = await r.json()
embed.set_image(res['data']['children'] [random.randint(0, 25)]['data']['url'])
await client.say(embed=embed)
Ignoring exception in command meme
Traceback (most recent call last):
File "C:UsersatillAppDataLocalProgramsPythonPython36libsite-packagesdiscordextcommandscore.py", line 50, in wrapped
ret = yield from coro(*args, **kwargs)
File "C:UsersatillDownloadsEpic Botserver.py", line 165, in meme
embed.set_image(res['data']['children'] [random.randint(0, 25)]['data']['url'])
TypeError: set_image() takes 1 positional argument but 2 were given
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:UsersatillAppDataLocalProgramsPythonPython36libsite-packagesdiscordextcommandsbot.py", line 846, in process_commands
yield from command.invoke(ctx)
File "C:UsersatillAppDataLocalProgramsPythonPython36libsite-packagesdiscordextcommandscore.py", line 374, in invoke
yield from injected(*ctx.args, **ctx.kwargs)
File "C:UsersatillAppDataLocalProgramsPythonPython36libsite-packagesdiscordextcommandscore.py", line 54, in wrapped
raise CommandInvokeError(e) from e
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: TypeError: set_image() takes 1 positional argument but 2 were given
I'm not sure how to make it so it is in an embed aswell
python discord discord.py aiohttp
add a comment |
I'm making a discord bot and I'm trying to make a random meme command and here's my error and code:
@client.command(pass_context=True)
async def meme(ctx):
embed = discord.Embed(title="meme", description="test")
async with aiohttp.ClientSession() as cs:
async with cs.get('https://www.reddit.com/r/dankmemes/new.json?sort=hot') as r:
res = await r.json()
embed.set_image(res['data']['children'] [random.randint(0, 25)]['data']['url'])
await client.say(embed=embed)
Ignoring exception in command meme
Traceback (most recent call last):
File "C:UsersatillAppDataLocalProgramsPythonPython36libsite-packagesdiscordextcommandscore.py", line 50, in wrapped
ret = yield from coro(*args, **kwargs)
File "C:UsersatillDownloadsEpic Botserver.py", line 165, in meme
embed.set_image(res['data']['children'] [random.randint(0, 25)]['data']['url'])
TypeError: set_image() takes 1 positional argument but 2 were given
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:UsersatillAppDataLocalProgramsPythonPython36libsite-packagesdiscordextcommandsbot.py", line 846, in process_commands
yield from command.invoke(ctx)
File "C:UsersatillAppDataLocalProgramsPythonPython36libsite-packagesdiscordextcommandscore.py", line 374, in invoke
yield from injected(*ctx.args, **ctx.kwargs)
File "C:UsersatillAppDataLocalProgramsPythonPython36libsite-packagesdiscordextcommandscore.py", line 54, in wrapped
raise CommandInvokeError(e) from e
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: TypeError: set_image() takes 1 positional argument but 2 were given
I'm not sure how to make it so it is in an embed aswell
python discord discord.py aiohttp
I'm making a discord bot and I'm trying to make a random meme command and here's my error and code:
@client.command(pass_context=True)
async def meme(ctx):
embed = discord.Embed(title="meme", description="test")
async with aiohttp.ClientSession() as cs:
async with cs.get('https://www.reddit.com/r/dankmemes/new.json?sort=hot') as r:
res = await r.json()
embed.set_image(res['data']['children'] [random.randint(0, 25)]['data']['url'])
await client.say(embed=embed)
Ignoring exception in command meme
Traceback (most recent call last):
File "C:UsersatillAppDataLocalProgramsPythonPython36libsite-packagesdiscordextcommandscore.py", line 50, in wrapped
ret = yield from coro(*args, **kwargs)
File "C:UsersatillDownloadsEpic Botserver.py", line 165, in meme
embed.set_image(res['data']['children'] [random.randint(0, 25)]['data']['url'])
TypeError: set_image() takes 1 positional argument but 2 were given
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:UsersatillAppDataLocalProgramsPythonPython36libsite-packagesdiscordextcommandsbot.py", line 846, in process_commands
yield from command.invoke(ctx)
File "C:UsersatillAppDataLocalProgramsPythonPython36libsite-packagesdiscordextcommandscore.py", line 374, in invoke
yield from injected(*ctx.args, **ctx.kwargs)
File "C:UsersatillAppDataLocalProgramsPythonPython36libsite-packagesdiscordextcommandscore.py", line 54, in wrapped
raise CommandInvokeError(e) from e
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: TypeError: set_image() takes 1 positional argument but 2 were given
I'm not sure how to make it so it is in an embed aswell
python discord discord.py aiohttp
python discord discord.py aiohttp
edited Mar 8 at 12:29
nkr
2,75842536
2,75842536
asked Mar 8 at 12:24
ColdLuckColdLuck
61
61
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
As stated in the error, the function set_image(url)
takes only 1 argument, and you gave it 2. And for the embed message look at this thread.
1
The important thing to note here is thatset_image
takes a single positional argument, which is theEmbed
instance the method is called on. The url should be passed as a keyword argument:embed.set_image(url=...)
.
– Patrick Haugh
Mar 8 at 14:21
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55063189%2faiohttp-meme-command-discord-py%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
As stated in the error, the function set_image(url)
takes only 1 argument, and you gave it 2. And for the embed message look at this thread.
1
The important thing to note here is thatset_image
takes a single positional argument, which is theEmbed
instance the method is called on. The url should be passed as a keyword argument:embed.set_image(url=...)
.
– Patrick Haugh
Mar 8 at 14:21
add a comment |
As stated in the error, the function set_image(url)
takes only 1 argument, and you gave it 2. And for the embed message look at this thread.
1
The important thing to note here is thatset_image
takes a single positional argument, which is theEmbed
instance the method is called on. The url should be passed as a keyword argument:embed.set_image(url=...)
.
– Patrick Haugh
Mar 8 at 14:21
add a comment |
As stated in the error, the function set_image(url)
takes only 1 argument, and you gave it 2. And for the embed message look at this thread.
As stated in the error, the function set_image(url)
takes only 1 argument, and you gave it 2. And for the embed message look at this thread.
answered Mar 8 at 12:32
AeossaAeossa
417
417
1
The important thing to note here is thatset_image
takes a single positional argument, which is theEmbed
instance the method is called on. The url should be passed as a keyword argument:embed.set_image(url=...)
.
– Patrick Haugh
Mar 8 at 14:21
add a comment |
1
The important thing to note here is thatset_image
takes a single positional argument, which is theEmbed
instance the method is called on. The url should be passed as a keyword argument:embed.set_image(url=...)
.
– Patrick Haugh
Mar 8 at 14:21
1
1
The important thing to note here is that
set_image
takes a single positional argument, which is the Embed
instance the method is called on. The url should be passed as a keyword argument: embed.set_image(url=...)
.– Patrick Haugh
Mar 8 at 14:21
The important thing to note here is that
set_image
takes a single positional argument, which is the Embed
instance the method is called on. The url should be passed as a keyword argument: embed.set_image(url=...)
.– Patrick Haugh
Mar 8 at 14:21
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55063189%2faiohttp-meme-command-discord-py%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown