# Renaming discobot causes it to break

**URL:** <https://meta.discourse.org/t/renaming-discobot-causes-it-to-break/63315>\
**Category:** Bug\
**Tags:** discobot\
**Created:** [5월 24, 2017, 8:56오후 UTC](https://meta.discourse.org/t/renaming-discobot-causes-it-to-break/63315 "2017-05-24T20:56:15Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![blake](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/blake/32/157322_2.png) [@blake](https://meta.discourse.org/u/blake)\
**Post date:** [5월 24, 2017, 8:56오후 UTC](https://meta.discourse.org/t/renaming-discobot-causes-it-to-break/63315/1 "2017-05-24T20:56:15Z")

</div>

I just tried renaming @discobot locally and on a live site and doing so causes it to not function properly.

See the screen shot below to see what happens after I renamed it to @pizzabot:

 ![](https://global.discourse-cdn.com/meta/original/3X/1/9/19ae2869d2a4dca73d2d1b00ab0d67cbd17837ee.png)

---

<div class="post-metadata">

**Author:** ![tgxworld](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tgxworld/32/106117_2.png) [@tgxworld](https://meta.discourse.org/u/tgxworld)\
**Post date:** [5월 24, 2017, 9:00오후 UTC](https://meta.discourse.org/t/renaming-discobot-causes-it-to-break/63315/3 "2017-05-24T21:00:39Z")

</div>

We’re caching it so it’ll take a rebuild for it to work.

> <https://github.com/discourse/discourse/blob/9fac5e28a55c8ccde4f525cd074cc2c24f17b86e/plugins/discourse-narrative-bot/lib/discourse_narrative_bot/actions.rb#L5-L9>

I’ll look into maybe adding an AR callback to burst the cache when the username changes.

---

<div class="post-metadata">

**Author:** ![blake](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/blake/32/157322_2.png) [@blake](https://meta.discourse.org/u/blake)\
**Post date:** [5월 26, 2017, 12:21오전 UTC](https://meta.discourse.org/t/renaming-discobot-causes-it-to-break/63315/4 "2017-05-26T00:21:30Z")

</div>

Okay I can confirm that doing a rebuild after a rename causes it to work again. But unless I’m doing something wrong I still think there are issues after a rename.

If I send a PM directly to my renamed bot it works great. But if I respond in a topic or in a PM to just myself and mention the bot it doesn’t work:

#### Message to myself:

 ![](https://global.discourse-cdn.com/meta/original/3X/c/2/c24ca3533bfadd756ac98e20995459131077b3b2.png)

#### Responding in a topic:

 ![](https://global.discourse-cdn.com/meta/original/3X/8/9/893cb47d484732f10ca8a62bb58bc1947cae8656.png)

#### PM to my renamed bot (this works)

 ![](https://global.discourse-cdn.com/meta/original/3X/c/0/c0c5e06a877f2bf47c66391f228c3c22440e0423.png)

---

<div class="post-metadata">

**Author:** ![tgxworld](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tgxworld/32/106117_2.png) [@tgxworld](https://meta.discourse.org/u/tgxworld)\
**Post date:** [5월 26, 2017, 2:15오전 UTC](https://meta.discourse.org/t/renaming-discobot-causes-it-to-break/63315/5 "2017-05-26T02:15:00Z")

</div>

Fixed in

[https://github.com/discourse/discourse/commit/7028bdceed47cfa02faed55d10d25298f16acca4](https://github.com/discourse/discourse/commit/7028bdceed47cfa02faed55d10d25298f16acca4)

---

<div class="post-metadata">

**Author:** ![tgxworld](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tgxworld/32/106117_2.png) [@tgxworld](https://meta.discourse.org/u/tgxworld)\
**Post date:** [5월 26, 2017, 2:15오전 UTC](https://meta.discourse.org/t/renaming-discobot-causes-it-to-break/63315/6 "2017-05-26T02:15:02Z")

</div>


