#Ephemeral messages always True?

1 messages · Page 1 of 1 (latest)

dry heath
#

Hi!
Starting these days, a bot of mine started to respond to interactions with ephemeral messages, but it is not supposed to. Default behavior is 'ephemeral=False', and I even tried to explicitly declare that on code. It was working just fine for long, and no changes were made on my side, it just started to behave like that. Does anyone have any idea why is that?

code sample:

    @discord.ui.button(label='Accept', emoji='👍', style=discord.ButtonStyle.primary, custom_id='Accept')
    async def accept_callback(self, button, inter):
        async with lock:
            srv = srv_switch(inter)
            loc = 'en' if inter.guild.preferred_locale.lower() != 'pt-br' else 'br'
            king = self.bot.get_guild(inter.guild.id).get_role(classes[srv]['contests'].get_king_role_id())
            chal = self.bot.get_guild(inter.guild.id).get_role(classes[srv]['contests'].get_chal_role_id())
            if king in inter.user.roles:
                if chal.members:
                    await inter.response.send_message(strings.text_chal_accept[loc].format(chal.members[0].mention),
                                                      ephemeral=False,
                                                      view=Victory(self.bot))
                else:
                    await inter.response.send_message(strings.text_chal_issue[loc],
                                                      ephemeral=False)
            else:
                await inter.response.send_message(strings.text_aint_king[loc].format(inter.user.display_name),
                                                  ephemeral=False)
                pass

After clicking "Accept" button, the response comes as ephemeral.

hearty relic
#

mhm

#

what is your py-cord version?

dry heath
#

2.4.1

#

Python 3.9

hearty relic
#

is the same happening if you remove it?

dry heath
#

if I remove "ephemeral=False", you mean? Yes

hearty relic
#

yes

dry heath
#

it is... that's the only change I tried so far, I'm out of ideas

#

been delving the docs, but found nothing related to that behavior

hearty relic
#

is the same happening with a slash command?

#
@client.slash_command()
async def test(ctx: discord.ApplicationContext):
    await ctx.respond("test", ephemeral=False)
dry heath
#

it has a single /setup command, everything else is using buttons.
I took some screenshots to help us better see it:

#

if one clicks on "Challenge", it works still, and a regular message comes up

#

and then, clicking on "Accept" or any other buttons will trigger an ephemeral message

#

the code I sent is the "Accept" button code

#

it has been working for over 6 months, and this issue just started these days

dry heath
#

slash commands work as expected, non-ephemeral

hearty relic
#

So

#

I tested that stuff and its just working fine

#

mhm

#

Can I see your pip list?

dry heath
#

Package Version


aiohttp 3.8.6
aiosignal 1.3.1
aiosqlite 0.19.0
APScheduler 3.10.4
arandr 0.1.10
astroid 2.5.1
asttokens 2.0.4
async-timeout 4.0.3
attrs 23.1.0
automationhat 0.2.0
beautifulsoup4 4.9.3
blinker 1.4
blinkt 0.1.2
buttonshim 0.0.2
cached-property 1.5.2
Cap1xxx 0.1.3
certifi 2020.6.20
chardet 4.0.0
charset-normalizer 3.3.0
click 7.1.2
colorama 0.4.4
colorzero 1.1
cryptography 3.3.2
cupshelpers 1.0
dbus-python 1.2.16
distro 1.5.0
docker 4.1.0
docker-compose 1.25.0
dockerpty 0.4.1
docopt 0.6.2
docutils 0.16
drumhat 0.1.0
envirophat 1.0.0
ExplorerHAT 0.4.2
Flask 1.1.2
fourletterphat 0.1.0
frozenlist 1.4.0
gpiozero 1.6.2
html5lib 1.1
idna 2.10
importlib-metadata 1.6.0
isort 5.6.4
itsdangerous 1.1.0
jedi 0.18.0
Jinja2 2.11.3
jsonschema 3.2.0
lazy-object-proxy 0.0.0
logilab-common 1.8.1
lxml 4.6.3
MarkupSafe 1.1.1
mccabe 0.6.1
microdotphat 0.2.1
more-itertools 4.2.0
mote 0.0.4
motephat 0.0.3

#

multidict 6.0.4
mypy 0.812
mypy-extensions 0.4.3
numpy 1.19.5
oauthlib 3.1.0
pantilthat 0.0.7
parso 0.8.1
pexpect 4.8.0
pgzero 1.2
phatbeat 0.1.1
pianohat 0.1.0
picamera 1.13
picamera2 0.3.12
pidng 4.0.9
piexif 1.1.3
piglow 1.2.5
pigpio 1.78
Pillow 8.1.2
pip 20.3.4
psutil 5.8.0
py-cord 2.4.1
pycairo 1.16.2
pycups 2.0.1
pycurl 7.43.0.6
pygame 1.9.6
Pygments 2.7.1
PyGObject 3.38.0
pyinotify 0.9.6
PyJWT 1.7.1
pylint 2.7.2
PyOpenGL 3.1.5
pyOpenSSL 20.0.1
PyQt5 5.15.2
PyQt5-sip 12.8.1
pyrsistent 0.15.5
pyserial 3.5b0
pysmbc 1.0.23
python-apt 2.2.1
python-dotenv 1.0.0
python-prctl 1.7
pytz 2023.3.post1
PyYAML 5.3.1
rainbowhat 0.1.0
reportlab 3.5.59
requests 2.25.1
requests-oauthlib 1.0.0
responses 0.12.1
roman 2.0.0
RPi.GPIO 0.7.0
RTIMULib 7.2.1
scrollphat 0.0.7
scrollphathd 1.2.1
Send2Trash 1.6.0b1
sense-hat 2.6.0
setuptools 52.0.0
simplejpeg 1.6.4
simplejson 3.17.2
six 1.16.0
skywriter 0.0.7
sn3218 1.2.7
soupsieve 2.2.1
spidev 3.5
ssh-import-id 5.10
texttable 1.6.3
thonny 4.0.1
toml 0.10.1
touchphat 0.0.1
twython 3.8.2
typed-ast 1.4.2
typing-extensions 4.8.0
tzlocal 5.1
unicornhathd 0.0.4
urllib3 1.26.5
v4l2-python3 0.3.2
webencodings 0.5.1
websocket-client 0.57.0
Werkzeug 1.0.1

#

wheel 0.34.2
wrapt 1.12.1
yarl 1.9.2
zipp 1.0.0

hearty relic
#

So it probably your current version I would say

#

The current version I use is 2.4.1.dev213+g8af8454a which is a master branch version

#

but the current master branch got problems with the slash commands

dry heath
#

thank you, I'll keep on trying

dry heath
#

still no clue 😨